Skip to contentSkip to conversation

ability to activate i2c-mux-gpio from user-space

DISCUSSION Srikanth Krishnamachary 1 participant 1 message Sep 16, 2014 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

Hello,
I was looking at the i2c-mux-gpio driver (http://lxr.free-
electrons.com/source/drivers/i2c/muxes/i2c-mux-gpio.c) which which provides the ability to i2c segments behind an i2c adapter where the specific segment is selectable via gpio mux.

It appears that the driver/instances have to be instantiated based on
either a device-tree or ACPI and that we can' add this from user-space.

I am having a system where I have i2c segments selectable via gpio. I
was wondering if there is any way that I could just use sysfs and instanitate the gpio-mux just like the way one can add an i2c-device.

Example, a new i2c device can be attached by writing to
/sys/bus/i2c/devices/i2c-0/new_device.
Similarly is there a way I can do something like\"echo "
(<gpio_pin1>,value1),..." <parent_i2c-bus>" and then have the i2c-mux-gpio instantiate an instance of this driver?

Any pointers would be greatly appreciated.

Thanks
Srikanth