Messages in this thread | | | Date | Mon, 10 Nov 2008 15:43:30 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH] power_supply: Add support for WM8350 PMU |
| |
On Thu, 6 Nov 2008 15:15:22 +0000 Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> This patch adds support for the PMU provided by the WM8350 which > implements battery, line and USB supplies including a battery charger. > The hardware functions largely autonomously, with minimal software > control required to initiate fast charging. > > Support for configuration of the USB supply is not yet implemented. > This means that the hardware will remain in the mode configured at > startup, by default limiting the current drawn from USB to 100mA. > > This driver was originally written by Liam Girdwood with subsequent > updates for submission by Mark Brown.
An idle question...
> + supply = "Battery"; > + supply = "USB"; > + supply = "Line"; > + supply = "Battery and USB";
> + charge = "Charger Off"; > + charge = "Trickle Charging"; > + charge = "Fast Charging";
> + dev_err(wm8350->dev, "battery too hot\n"); > + dev_err(wm8350->dev, "battery too cold\n"); > + dev_err(wm8350->dev, "battery failed\n"); > + dev_err(wm8350->dev, "charger timeout\n"); > + dev_dbg(wm8350->dev, "charger stopped\n"); > + dev_dbg(wm8350->dev, "charger started\n"); > + dev_dbg(wm8350->dev, "fast charger ready\n"); > + dev_warn(wm8350->dev, "battery < 3.9V\n"); > + dev_warn(wm8350->dev, "battery < 3.1V\n"); > + dev_warn(wm8350->dev, "battery < 2.85V\n");
The above constitutes a sort-of userspace interface. A number of the things which are being reported there are fairly common to the technology and other drivers will be able to report them.
But afaict this interface is unique to this particular driver. Has any thought been given to standardising this interface across all similar drivers? Too messy?
| |