Commit Graph
15 Commits
Author SHA1 Message Date
Wolfram Sang 816c44c369 power: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <[email protected]>
2014-10-20 16:21:27 +02:00
Jingoo Han e083587924 power: Use platform_{get,set}_drvdata()
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Anton Vorontsov <[email protected]>
2013-06-06 17:30:46 -07:00
Bill Pemberton 415ec69fb1 power: remove use of __devexit
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <[email protected]>
Cc: Anton Vorontsov <[email protected]>
Cc: David Woodhouse <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-28 11:43:22 -08:00
Bill Pemberton c8afa6406e power: remove use of __devinit
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <[email protected]>
Cc: Anton Vorontsov <[email protected]>
Cc: David Woodhouse <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-28 11:43:22 -08:00
Bill Pemberton 28ea73f4c6 power: remove use of __devexit_p
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <[email protected]>
Cc: Anton Vorontsov <[email protected]>
Cc: David Woodhouse <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-28 11:43:22 -08:00
Axel Lin 300bac7fb8 power_supply: Convert drivers/power/* to use module_platform_driver()
This patch converts the drivers in drivers/power/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Mike Rapoport <[email protected]>
Cc: Lars-Peter Clausen <[email protected]>
Cc: Nithish Mahalingam <[email protected]>
Cc: MyungJoo Ham <[email protected]>
Cc: Haojian Zhuang <[email protected]>
Cc: Balaji Rao <[email protected]>
Cc: Mark Brown <[email protected]>
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Clifton Barnes <[email protected]>
Signed-off-by: Anton Vorontsov <[email protected]>
2012-01-04 09:12:07 +04:00
Major Lee 7925231037 intel_mid_battery: Handle Over Current gracefully
When DCDC input line over current detecting, PMIC will change charging
current automatically. Logging event is enough.

Signed-off-by: Major Lee <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Anton Vorontsov <[email protected]>
2011-11-24 23:46:35 +04:00
Justin P. Mattock 6eab04a876 treewide: remove extra semicolons
Signed-off-by: Justin P. Mattock <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2011-04-10 17:01:05 +02:00
Linus Torvalds 5957e33d6a Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6: (21 commits)
  power_supply: Add MAX17042 Fuel Gauge Driver
  olpc_battery: Fix up XO-1.5 properties list
  olpc_battery: Add support for CURRENT_NOW and VOLTAGE_NOW
  olpc_battery: Add support for CHARGE_NOW
  olpc_battery: Add support for CHARGE_FULL_DESIGN
  olpc_battery: Ambient temperature is not available on XO-1.5
  jz4740-battery: Should include linux/io.h
  s3c_adc_battery: Add gpio_inverted field to pdata
  power_supply: Don't use flush_scheduled_work()
  power_supply: Fix use after free and memory leak
  gpio-charger: Fix potential race between irq handler and probe/remove
  gpio-charger: Provide default name for the power_supply
  gpio-charger: Check result of kzalloc
  jz4740-battery: Check if platform_data is supplied
  isp1704_charger: Detect charger after probe
  isp1704_charger: Set isp->dev before anything needs it
  isp1704_charger: Detect HUB/Host chargers
  isp1704_charger: Correct length for storing model
  power_supply: Add gpio charger driver
  jz4740-battery: Protect against concurrent battery readings
  ...
2011-01-14 09:25:59 -08:00
Tejun Heo bc51e7ff52 power_supply: Don't use flush_scheduled_work()
flush_scheduled_work() is deprecated and scheduled to be removed.

In battery drivers, the work can be canceled on probe failure and
removal and should be flushed on suspend.  Replace
flush_scheduled_work() usages with direct cancels and flushes.

Signed-off-by: Tejun Heo <[email protected]>
Signed-off-by: Anton Vorontsov <[email protected]>
2010-12-22 02:39:56 +03:00
Tejun Heo afe2c511fb workqueue: convert cancel_rearming_delayed_work[queue]() users to cancel_delayed_work_sync()
cancel_rearming_delayed_work[queue]() has been superceded by
cancel_delayed_work_sync() quite some time ago.  Convert all the
in-kernel users.  The conversions are completely equivalent and
trivial.

Signed-off-by: Tejun Heo <[email protected]>
Acked-by: "David S. Miller" <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Evgeniy Polyakov <[email protected]>
Cc: Jeff Garzik <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: [email protected]
Cc: Anton Vorontsov <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: "J. Bruce Fields" <[email protected]>
Cc: Neil Brown <[email protected]>
Cc: Alex Elder <[email protected]>
Cc: [email protected]
Cc: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: [email protected]
Cc: Trond Myklebust <[email protected]>
Cc: [email protected]
2010-12-15 10:56:11 +01:00
Shuduo Sang 77f4b9fe05 intel_pmic_battery: Fix battery charging status on mrst
The arguments got swapped on some functions which produces undefined results.
The main one got fixed before submit but the other two were missed.

Signed-off-by: Shuduo Sang <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Anton Vorontsov <[email protected]>
2010-08-24 18:27:57 +04:00
Alan Cox f59f5bcb60 intel_mid_battery: Fix battery scaling
There are 3600 seconds per not 3600 hours per second. Correcting this
along with the previous fix gives sensible numbers.

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Anton Vorontsov <[email protected]>
2010-08-10 14:35:27 +04:00
Arjan van de Ven 08a9e07e3f intel_mid_battery: Fix the argument order to intel_scu_ipc_command
The arguments to intel_scu_ipc_command are "command, subcommand"
the battery driver got this the wrong way around.

Signed-off-by: Arjan van de Ven <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Anton Vorontsov <[email protected]>
2010-08-10 14:34:55 +04:00
Nithish Mahalingam 6721081b6b Intel MID platform battery driver
The PMIC Battery driver provides battery charging and battery gauge
functionality on Intel MID platforms. This provides the basic functions.
There are some USB drivers to merge before the selection of charging
between the different USB power levels can be enabled.

Moved to a platform device by Alek Du.

Signed-off-by: Nithish Mahalingam <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Anton Vorontsov <[email protected]>
2010-06-17 21:52:25 +04:00