Re: Kernel touch Kconfig consult

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HI Marek & Dmiitry,
	My colleague and me,we have different voice about this, I would
appreciate your comment about this.

Simply:
I think
https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
supports  to use string type Kconfig, although this type is not used
much;
we use string type kconfig to select which drivers to build in, every 
built in driver itself detect its hw according to its dts info, and
exit if detect fail; 
ifdef chaos in vendor kernel.. I think there is a touch common driver
layer, and common drv and specific drv is not layered ideal.








On Wen, Jun 26, 2019 at 10:18:19AM -0400, luhua.xu wrote:
Hi Marek and Dmitry,


On Sun, 2019-06-23 at 12:43 +0200, Marek Vasut wrote:
> On 6/23/19 9:02 AM, Dmitry Torokhov wrote:
> > Hi,
> >
> > On Fri, Jun 14, 2019 at 06:47:19AM -0400, luhua.xu wrote:
> >> Hi Dmitry,Rob,Marek, Nick,Richard,Martin,
> >>
> >> In our  customer support experience, many smartphone have two or
> >> three touch vendor mixture , and customer use one load to support all touches.
> >> For easy to config touch driver  we use kernel config like this
> >> down below,
> >>
> >> We change the config type from 'bool' to 'string'.
> >>
> >> config TOUCHSCREEN_MTK_TOUCH
> >>   string "Touch IC name for Mediatek package"
> >>   help
> >>     Set touch IC name if you have touch panel.
> >>     To compile this dirver for used touch IC.
> >>
> >>
> >> And we config touch driver like this:
> >> CONFIG_TOUCHSCREEN_MTK_TOUCH="GT9886 GT1151 TD4320"
> >>
> >> I only use one config to support  3 touches, while we have to use 3
> >> config to support 3  touch drivers if we set the config as 'bool'.
> >>
> >> So can I use Kconfig like this?
> >> I do look forward to receiving your reply at your convenience .
> >>
> >
> > I really do not see why having a sting is easier to have than 3
> > bools, especially if they pertain to different touch controllers.
> > You must also have some custom processing of the config above as I
> > am pretty sure our standard build tools would not work for it.
>
> I might be missing something obvious, but isn't DT something you want
> to use on your ARM device to describe the hardware , instead of
> hard-coding it into the kernel configuration ?
>
> I recently worked with MT6797 (the Gemini PDA SoC), and the
> vendorkernel does exactly this, it's a spectacular display of
> ifdeffery and Kconfig chaos, so I suspect this is where the idea of
> putting stuff into Kconfig comes from.
>

Thanks so much for your kindly help and repley.

As time goes by, more and more touch types will be added in our platform. To avoid hard-coding it into the kernel configuration, I use 'string' type Kconfig, and it will aways keeps one config no matter how many touch drivers we want.
For example, we have touch1, touch2...touch10. We need 10 Kconfigs if we use 'bool' type Kconfig.

I have already tested the 'string' type Kconfig, standard build tools supports well. (such as in android P and kernel 4.14).
And the document down below also shows Kbuild have the 'string' type Kconfig https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt

Btw, In my opinion, DT is used for configuring  the touch device info such as i2c slaver address. But we need to decide which touch driver should be build in for a project.






[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux