Re: Multiple Instances of Drivers

Pushpal Sidhu


Thanks for pointing me to that. Pretty much exactly what I was looking
/ hoping for.

- Pushpal

On Thu, May 17, 2018 at 11:59 PM, Tomasz Bursztyka
<tomasz.bursztyka@...> wrote:

There is already an on-going work on how devices (aka driver instance)
are generated.

See issue:

Especially, check for b0661 and erwango PRs



I have a question about the current plan to allow multiple instances
of a driver.

For example, say we have two sx1509b devices as opposed to the
currently supported single instance:
&i2c0 {
status = "ok";
clock-frequency = <I2C_BITRATE_FAST>;

sx1509b: sx1509b@3e {
compatible = "semtech,sx1509b";
reg = <0x3e>;
label = "GPIO_P0";

sx1509b: sx1509b@3f {
compatible = "semtech,sx1509b";
reg = <0x3f>;
label = "GPIO_P1";

Only the one one whose .fixup defines CONFIG_GPIO_SX1509B_* gets an
instance, while the other doesn't. To add two devices, I would have
hack the driver + fixup to define the correct configuration

I just want to know the current plan to address this and how drivers
need to be written going forward. I couldn't find an issue that
address this, but I could easily have missed it and am just "looking
in the other pocket for my keys".

- Pushpal

Join to automatically receive all group messages.