How to make the IC driver

Hi, I’d like to use TC358762 (this IC’s supplier is Toshiba).
I found a source code “Tc358767_dsi2edp” at “/usr/src/kernel/display/drivers/video/tegra/dc/”,
and I made a driver by modifing that source.
The compile is successed but I couldn’t make .ko file (module).
In the case of describing “tristate” in Kconfig, then compile error is appeared.
Is there any way to make the driver ?

Hi,

Please try to enable this module in “tegra18_defconfig”

Thanks for you advice.
I tried following action but compile error is appeared.

I add “CONFIG_TEGRA_DSI2EDP_TC358767=m” in tegra18_defconfig.
And a value is changed in …/display/drivers/video/tegra/Kconfig.display
from “bool” to “tristate”.
Then execute compile and it had became error.
The error message is following,

In file included from
drivers/video/tegra/…/…/…/…/display/drivers/video/tegra/dc/tc358767_dsi2edp.c:30:0:
drivers/video/tegra/…/…/…/…/display/drivers/video/tegra/dc/dsi.h:476:30:
error: expected identifier or ‘(’ before ‘struct’
#define tegra_dsi2edp_ops (*(struct tegra_dsi_out_ops *)NULL)

In the case of “CONFIG_TEGRA_DSI2EDP_TC358767=y” then compile is succeeded.
I’d like to compile it with “CONFIG_TEGRA_DSI2EDP_TC358767=m”.
Do you have any idea?

If you want to build it as a module, more change may require since our driver is for built-in.

After setting CONFIG_TEGRA_DSI2EDP_TC358767 to “m”, those macro in driver should be “CONFIG_TEGRA_DSI2EDP_TC358767_MODULE” instead of original one.