I2C Disable

Hey

I have to use the I2C as GPIOs for test purpose.
My idea is to make a overlay with this I2C1 and I2C2 pins and set those pins to mode 7 (GPIO).
I tried this but the activation of the overlay won’t work. The errormessage (see end of the text) says, that the pin-95 is already in use by 4819c00.i2c.

How can I disable the I2C driver that this pin-95 isnt’s used by that driver?
Can I do that with another overlay or eventually the uEnv.txt file?
What does the status -22 stand for?

Thanks for your help!
Have a nice day

I’m using BBB Rev.C with Angstrom Distribution

Errormessage:
Compiling the overlay from .dts to .dtbo
[ 17.271435] pinctrl-single 44e10800.pinmux: pin 44e1097c already requested by 4819c000.i2c; cannot claim for helper.11
[ 17.283056] pinctrl-single 44e10800.pinmux: pin-95 (helper.11) status -22
[ 17.290398] pinctrl-single 44e10800.pinmux: could not request pin 95 on device pinctrl-single
[ 17.299553] bone-pinmux-helper helper.11: Failed to select default state

You need to remove the pinmux setting from the I2C portion of the
device-tree overlay and add pinmux-helper sections that control just the
pinmux registers. This allows you to change pinmux values at runtime
while still loading the I2C driver.

You can set the default startup mode for the pin as required (to GPIO or
I2C or whatever) using the mode= setting I added to the pinmux-helper
driver. There are examples in the 3.14 overlay where this sort of setup
is mandatory since you can't load device-tree overlays:

https://github.com/beagleboard/linux/blob/3.14/arch/arm/boot/dts/am335x-bone-i2c2-cape-eeprom.dtsi

https://github.com/beagleboard/linux/blob/3.14/arch/arm/boot/dts/am335x-bone-common-pinmux.dtsi#L1903-L1925