Re: [PATCH] Input: tca6416-keypad: Change to module_init()

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

 



On Wed, Mar 23, 2011 at 1:59 AM, Mark Brown
<broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, Mar 23, 2011 at 01:51:02AM +0900, Magnus Damm wrote:
>
>> I'm not sure if this is i2c specific though - in general you probably
>> need to register the parent bus driver first.
>
> This was my original question - I'm not aware of any reason why you
> should need to register the driver for the specific bus first, it seems
> odd.

Can't see why it wouldn't work - in theory at least. I'll have a look tomorrow.

The use of subsys_initcall() in the keypad driver is also a bit odd IMO.

>> > In general embedded platforms register I2C early as things like PMICs
>> > typically hang off them.  Grant was trying to push people to use
>> > deferred registration for this stuff but it didn't happen yet and I'd
>> > personally be more comfortable with more infastructure supporting that.
>
>> The dependency tracking is a bit primitive with only initcalls. I
>> wouldn't mind something like this:
>
> That's not a general solution as it doesn't cover things like cross
> dependencies between devices on the same bus type.  You really want to
> be able to say "I depend on this set of other devices" somehow, the
> proposal from Grant that I'm talking about was to only register devices
> once their dependencies had appeared which solves the issue but is a bit
> manual for the board files.

Sounds nice. Hopefully that will allow us to use module_init() in
drivers instead of other initcall levels depending on bus type.

Thanks,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux