This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

如何在lp5523驱动里面实现一个GPIO enable脚 挂4个lp5523设备,然后在kernel初始化阶段,让4个lp55231设备全亮起来

Other Parts Discussed in Thread: LP5523, LP55231

我这边一个平台,有4个lp55231的device,共用一根GPIO enable pin脚,在lp5523_probe()里面,第一个lp55231设备做devm_gpio_request_one()成功后,后面第2、3、4个lp55231设备 在这里会失败,返回码-6,表示EBUSY,code在附件里面,如果做个gpio_free(),就不会失败。但是这样kernel初始化完以后,只有第四个设备可以正常使用。

因为:GPIO申请完free掉,这样不安全,因为是同一条复位线。如果另外一个驱动申请到了,会把所有芯片重新又复位一次,导致原来已经配置的芯片配置消失。

请问大家还有其他什么方法吗?