public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* power_supply: Making "enum power_supply_type type" dynamic
@ 2015-07-02 17:56 Pallala, Ramakrishna
  2015-07-24 15:26 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: Pallala, Ramakrishna @ 2015-07-02 17:56 UTC (permalink / raw)
  To: linux-pm@vger.kernel.org, Krzysztof Kozlowski, Sebastian Reichel

Hi Sebastian/Krzysztof,

Currently 'enum power_supply_type type' is part of 'struct power_supply_desc' which is again defined as a 'const *' in 'struct power_supply'

Can we move the 'enum power_supply_type type' to 'struct power_supply' itself?

Rational behind this is, if you take any mobile  or tablet device it comes with one USB charging port but it can support multiple charging cables like
SDP, CDP and DCP etc.. So whenever we connect any of these cables we need to adjust the charger parameters accordingly.

So the point here is, If we are using same physical charging port and the same charger IC for setting up the charging we can have one power supply class registration
from  the charger driver and change the power supply type based on the cable detection at runtime.

The current implementation forces us to create multiple power supply objects for each cable type which is not optimal as all these objects set/get methods
operate on the same set of registers.

Thanks,
Ram


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

end of thread, other threads:[~2015-07-24 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-02 17:56 power_supply: Making "enum power_supply_type type" dynamic Pallala, Ramakrishna
2015-07-24 15:26 ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox