linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* struct i2c_mux_pinctrl_platform_data for the i2c-mux-pinctrl driver
@ 2017-05-22  8:24 Peter Rosin
  2017-05-22 15:51 ` Stephen Warren
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Rosin @ 2017-05-22  8:24 UTC (permalink / raw)
  To: Stephen Warren; +Cc: linux-i2c, linux-kernel

Hi Stephen,

I was looking at the i2c-mux-pinctrl driver and noticed that it has
code to feed it platform data from C code. There has never been any
in-kernel users of this interface and I would like to remove it. I
wonder if you added it way back when just because the i2c-mux-gpio
driver have such an interface or if, to your knowledge, any external
platform exists that depends on this?

I.e. I'm talking about removing include/linux/i2c-mux-pinctrl.h and
the code supporting it in the driver, thus only allowing devicetree
as source for the platform data.

Cheers,
peda

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: struct i2c_mux_pinctrl_platform_data for the i2c-mux-pinctrl driver
  2017-05-22  8:24 struct i2c_mux_pinctrl_platform_data for the i2c-mux-pinctrl driver Peter Rosin
@ 2017-05-22 15:51 ` Stephen Warren
  2017-05-23  6:49   ` Peter Rosin
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Warren @ 2017-05-22 15:51 UTC (permalink / raw)
  To: Peter Rosin, Stephen Warren; +Cc: linux-i2c, linux-kernel

On 05/22/2017 02:24 AM, Peter Rosin wrote:
> Hi Stephen,
> 
> I was looking at the i2c-mux-pinctrl driver and noticed that it has
> code to feed it platform data from C code. There has never been any
> in-kernel users of this interface and I would like to remove it. I
> wonder if you added it way back when just because the i2c-mux-gpio
> driver have such an interface or if, to your knowledge, any external
> platform exists that depends on this?
> 
> I.e. I'm talking about removing include/linux/i2c-mux-pinctrl.h and
> the code supporting it in the driver, thus only allowing devicetree
> as source for the platform data.

I'm not aware of any in- or out-of-tree users of that structure/feature.

I added it because at the time I wrote that driver, it was common place 
to support both DT-based and platform-data-based 
instantiation/configuration of devices, so I did the same. If you're 
removing pdata-based configuration, it would make sense to do a blanket 
removal across the entire I2C subsystem (and other subsystems too) I 
suspect, but that's LinusW's call in the end.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: struct i2c_mux_pinctrl_platform_data for the i2c-mux-pinctrl driver
  2017-05-22 15:51 ` Stephen Warren
@ 2017-05-23  6:49   ` Peter Rosin
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Rosin @ 2017-05-23  6:49 UTC (permalink / raw)
  To: Stephen Warren, Stephen Warren; +Cc: linux-i2c, linux-kernel

On 2017-05-22 17:51, Stephen Warren wrote:
> On 05/22/2017 02:24 AM, Peter Rosin wrote:
>> Hi Stephen,
>>
>> I was looking at the i2c-mux-pinctrl driver and noticed that it has
>> code to feed it platform data from C code. There has never been any
>> in-kernel users of this interface and I would like to remove it. I
>> wonder if you added it way back when just because the i2c-mux-gpio
>> driver have such an interface or if, to your knowledge, any external
>> platform exists that depends on this?
>>
>> I.e. I'm talking about removing include/linux/i2c-mux-pinctrl.h and
>> the code supporting it in the driver, thus only allowing devicetree
>> as source for the platform data.
> 
> I'm not aware of any in- or out-of-tree users of that structure/feature.
> 
> I added it because at the time I wrote that driver, it was common place 
> to support both DT-based and platform-data-based 
> instantiation/configuration of devices, so I did the same. If you're 

That's what I suspected, thanks for confirming!

> removing pdata-based configuration, it would make sense to do a blanket 
> removal across the entire I2C subsystem (and other subsystems too) I 
> suspect, but that's LinusW's call in the end.

(Wolfram Sang is the I2C maintainer)

Well, a couple of other drivers I looked at still have in-tree users.
This driver stands out in that it never ever had any in-tree user, and
I find no traces of any out-of-tree user either. That last bit might
of course be due to lacking google-fu on my part or that the out-of-
tree user was never available online in the first place. But it is a
data point. Also, removing a third or so of the driver and at the same
time making it easier to follow the code sounds like something I want
to do.

Embarking on the bigger project is however not something I'm signing
up for, not that I don't think it would be worthwhile.

I'll send a patch when I have done some further tests with what I
have cooking...

Cheers,
peda

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-23  6:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-22  8:24 struct i2c_mux_pinctrl_platform_data for the i2c-mux-pinctrl driver Peter Rosin
2017-05-22 15:51 ` Stephen Warren
2017-05-23  6:49   ` Peter Rosin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).