- 08 3月, 2010 2 次提交
-
-
由 Mark Brown 提交于
The headphone detect and charger are using the IRQ numbers so need to take account of irq_base with the genirq conversion. I obviously picked the wrong system for initial testing. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark Brown 提交于
To better match genirq. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
- 27 2月, 2010 2 次提交
-
-
由 Grazvydas Ignotas 提交于
The chip returns voltage and current in mV and mA, but power supply class uses uV and uA, so add missing conversion. Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Grazvydas Ignotas 提交于
The BQ27x00 series of chips can report time-to-empty and time-to-full, so let's add corresponding properties. Also report charge status based on status flag register. Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 17 2月, 2010 4 次提交
-
-
由 Grazvydas Ignotas 提交于
BQ27500 is newer fuel gauge chip from TI with slightly changed register layout and some different register semantics. Add new i2c ID for it and handle differences where needed. Also rename bq27200 functions to bq27x00, as they are no longer bq27200 specific. Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Acked-by: NRodolfo Giometti <giometti@linux.it> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Grazvydas Ignotas 提交于
The power supply class requires tenths of degree Celsius. Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Acked-by: NRodolfo Giometti <giometti@linux.it> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Grazvydas Ignotas 提交于
These are probably leftover from old TI code. Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Acked-by: NRodolfo Giometti <giometti@linux.it> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Grazvydas Ignotas 提交于
The bq27x00 registers are little endian, so just read them as such and don't do double endian swap on LE machines. This also gets rid of strange looking shift that was done after reading 8bit register because endian swap in bq27x00_read() was messing it up. Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Acked-by: NRodolfo Giometti <giometti@linux.it> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 03 2月, 2010 1 次提交
-
-
由 Stefan Weil 提交于
platfrom -> platform monotor -> monitor Signed-off-by: NStefan Weil <weil@mail.berlios.de> Cc: Anton Vorontsov <cbouatmailru@gmail.com> Acked-by: NMike Rapoport <mike@compulab.co.il> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
-
- 29 1月, 2010 2 次提交
-
-
由 Mark Brown 提交于
Staticise work_lock (nothing outside the driver has any reason to see it) and specify dev when requesting the charger IRQ (since that's what we pass in when we free it). Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
-
由 Mark Brown 提交于
Don't unconditionally dereference the WM97xx core platform data since it may not be present, causing an oops. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
-
- 18 12月, 2009 1 次提交
-
-
由 Thomas Champagne 提交于
Prior to this patch, pmu_battery was unable to report battery full status. This patch fixes the issue by adding a proper handling code into pmu_bat_get_property(): if we're on AC and the battery isn't charging, then the battery is considered full. Signed-off-by: NThomas Champagne <lafeuil@gmail.com> Acked-By: NDavid Woodhouse <David.Woodhouse@intel.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 16 12月, 2009 1 次提交
-
-
由 Alexey Dobriyan 提交于
Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 14 12月, 2009 3 次提交
-
-
由 Mark Brown 提交于
Bring the WM8350 IRQ API more in line with the generic IRQ API by masking and unmasking interrupts as they are requested and freed. This is mostly just a case of deleting the mask and unmask calls from the individual drivers. The RTC driver is changed to mask the periodic IRQ after requesting it rather than only unmasking the alarm IRQ. If the periodic IRQ fires in the period where it is reqested then there will be a spurious notification but there should be no serious consequences from this. The CODEC drive is changed to explicitly disable headphone jack detection prior to requesting the IRQs. This will avoid the IRQ firing with no jack set up. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark Brown 提交于
This is done as simple code transformation, the semantics of the IRQ API provided by the core are are still very different to those of genirq (mainly with regard to masking). Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Lars-Peter Clausen 提交于
Since platform_device_add_data copies the passed data, the allocated subdev_pdata is never freed. A simple fix would be to either free subdev_pdata or put it onto the stack. But since the pcf50633 child devices can rely on beeing children of the pcf50633 core device it's much more elegant to get access to pcf50633 core structure through that link. This allows to get completly rid of pcf5033_subdev_pdata. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NPaul Fertser <fercerpav@gmail.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
- 03 12月, 2009 1 次提交
-
-
由 Anton Vorontsov 提交于
There are cases when some device can not report any meaningful value, e.g. TWL4030 charger can report voltage only when charging is active. In these cases drivers will return -ENODATA, and we shouldn't flood kernel log with error messages. Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
-
- 28 11月, 2009 1 次提交
-
-
由 Thomas Kunze 提交于
This driver is based on tosa_battery.c.
-
- 18 11月, 2009 1 次提交
-
-
由 Alan Cox 提交于
Signed-off-by: NAlan Cox <alan@linux.intel.com> Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 16 11月, 2009 6 次提交
-
-
由 Paul Fertser 提交于
Current scheme is fragile and is likely to go off sync, especially on batfull->adapter charging automatic MBC transition. Query the status bit every time we need it instead. We need to export another function to query for USB presence because we can't read anything from PCF50633 (via I2C) inside irq context and that is needed by usb gadgets. Signed-off-by: NPaul Fertser <fercerpav@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Paul Fertser 提交于
If chgmod == BATFULL, setting chgena has no effect. Datasheet says we need to set resume instead but when autoresume is used resume doesn't work. Clear and set chgena instead. This enables a user to force charging by re-plugging USB even when the charger entered Battery Full mode, might be handy before a long trip. Signed-off-by: NPaul Fertser <fercerpav@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Paul Fertser 提交于
After reaching Battery Full condition MBC state machine switches back into charging mode when the battery voltage falls below 96% of a battery float voltage. The voltage drop in Li-Ion batteries is marginal (1-2%) till about 80% of its capacity - which means, after a BATFULL, charging won't be restarted until 75-80%. That is a desired behaviour recommended by battery manufacturers, don't mess with it. Signed-off-by: NPaul Fertser <fercerpav@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Balaji Rao 提交于
Implement a new sysfs attribute to allow changing MBC charging limit on the fly independently of usb current limit. It also gets set automatically every time usb current limit is changed. Limiting charging current also prevents violating USB specification in the case when the whole device is shut down and usb current limit is reset to the factory default by the pcf50633 state transition. Signed-off-by: NBalaji Rao <balajirrao@openmoko.org> Signed-off-by: NPaul Fertser <fercerpav@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Sean McNeil 提交于
This adds an appropriate ac power_supply class and shows usb only when at the appropriate current limit. Signed-off-by: NSean McNeil <sean@mcneil.com> Signed-off-by: NPaul Fertser <fercerpav@gmail.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Mark Brown 提交于
The backup battery on WM831x is a separate IP block to the main PMU and is largely unrelated to the main supply functionality. Factor it out into a separate driver in order to reflect this and better support future hardware versions. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NSamuel Ortiz <sameo@linux.intel.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 05 9月, 2009 5 次提交
-
-
由 Mark Brown 提交于
The WM831x PMICs provide power path management from three sources: a wall supply, USB and a battery with integrated charger. They also provide an additional backup supply with integrated for maintaining always on functionality such as the RTC and monitoring of power switches. After some initial configuration at startup the device operates autonomously, the driver simply provides reporting of the current state. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
-
由 Daniel Mack 提交于
On the device we're currently developing, battery sizes of ~2.8Ah and current flow of ~600mA are typical. With that values, the life_sec computation overflows due to the multiplication by 3600. Signed-off-by: NDaniel Mack <daniel@caiaq.de> Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu> Cc: Matt Reimer <mreimer@vpop.net> Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
-
由 Marek Vasut 提交于
Signed-off-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
-
由 Marek Vasut 提交于
Signed-off-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
-
由 Marek Vasut 提交于
This patch converts the wm97xx-battery driver to use platform_data supplied by ac97 bus. Signed-off-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
-
- 30 7月, 2009 8 次提交
-
-
由 Daniel Mack 提交于
The ds2760's internal current meter is not reliable enough as it has an inacurracy of around ~15%. Without any correction for that error, the current accumulator is couting up all the time, even though the battery is already fully charged and hence destroys the static information. The longer it is connected, the worse is the aberration. Fortunately, this can be corrected by the DS2760_CURRENT_OFFSET_BIAS register. Using the external power_supply_set_battery_charged() function, this register is now gauging the measurement. A delayed work is used to debounce flaky GPIO signals and to let the current value settle. Also see Maxim's application note AN4188. Signed-off-by: NDaniel Mack <daniel@caiaq.de> Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu> Cc: Matt Reimer <mreimer@vpop.net> Cc: Anton Vorontsov <cbou@mail.ru> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Daniel Mack 提交于
This adds a function that indicates that a battery is fully charged. It also includes functions to get a power_supply device from the class of registered devices by name reference. These can be used to find a specific battery to call power_supply_set_battery_charged() on. Some battery drivers might need this information to calibrate themselves. Signed-off-by: NDaniel Mack <daniel@caiaq.de> Cc: Ian Molton <spyro@f2s.com> Cc: Anton Vorontsov <cbou@mail.ru> Cc: Matt Reimer <mreimer@vpop.net> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Daniel Mack 提交于
While I'm at it, cleanup the power supply code so that EXPORT_SYMBOL_GPL appears directly after the symbole declaration. checkpatch.pl wants it that way. Signed-off-by: NDaniel Mack <daniel@caiaq.de> Cc: Ian Molton <spyro@f2s.com> Cc: Matt Reimer <mreimer@vpop.net> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Daniel Mack 提交于
When connecting a ds2760 to a partly loaded battery the first time, there must be a way to bootstrap the current_accum value. Without that, the current capactity value is bogus until the battery is fully charged for the first time. Signed-off-by: NDaniel Mack <daniel@caiaq.de> Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu> Cc: Matt Reimer <mreimer@vpop.net> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Daniel Mack 提交于
In systems where the battery monitor is not part of the battery pack and is hence not bootstrapped with sane values, the full_active_uAh is likely to be zero. Handle that case by defaulting to the rated_capacity information which can be passed to the driver using the new module parameter. Signed-off-by: NDaniel Mack <daniel@caiaq.de> Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu> Acked-by: NMatt Reimer <mreimer@vpop.net> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Daniel Mack 提交于
For systems where the ds2760 is soldered directly on the PCB, the 'rated capacity' register is not set to anything useful. In order to allow users to bootstrap this value, introduce a new module parameter 'rated_capacity' and use it to write the internal EEPROM in case the value differes from what's been given. Signed-off-by: NDaniel Mack <daniel@caiaq.de> Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu> Acked-by: NMatt Reimer <mreimer@vpop.net> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Daniel Mack 提交于
Export POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW and POWER_SUPPLY_PROP_CAPACITY features to the power supply core. Signed-off-by: NDaniel Mack <daniel@caiaq.de> Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu> Acked-by: NMatt Reimer <mreimer@vpop.net> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
由 Daniel Mack 提交于
This fixes a race condition I recently introduced with the PMOD feature addition (cef437e3: "w1: ds2760_battery: add support for sleep mode feature"). Postpone the call to power_supply_register() to fix it. Signed-off-by: NDaniel Mack <daniel@caiaq.de> Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu> Acked-by: NMatt Reimer <mreimer@vpop.net> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 14 7月, 2009 1 次提交
-
-
由 Mark Brown 提交于
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
-
- 13 7月, 2009 1 次提交
-
-
由 Alexander Beregalov 提交于
direct access of driver_data is going away. Signed-off-by: NAlexander Beregalov <a.beregalov@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-