Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252145
b: refs/heads/master
c: 2c60823
h: refs/heads/master
i:
  252143: 03c7eeb
v: v3
  • Loading branch information
Mark Brown authored and Liam Girdwood committed May 27, 2011
1 parent 9272a3d commit 9ba9596
Show file tree
Hide file tree
Showing 43 changed files with 331 additions and 1,292 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ea0ca3a843babd50c22dfbb5cf2d9a14df821b2b
refs/heads/master: 2c6082341d1896218ca974cc2bb6876e36fcba5c
7 changes: 0 additions & 7 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2584,13 +2584,6 @@ S: Maintained
F: drivers/hwmon/f75375s.c
F: include/linux/f75375s.h

FIREWIRE AUDIO DRIVERS
M: Clemens Ladisch <clemens@ladisch.de>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
T: git git://git.alsa-project.org/alsa-kernel.git
S: Maintained
F: sound/firewire/

FIREWIRE SUBSYSTEM
M: Stefan Richter <stefanr@s5r6.in-berlin.de>
L: linux1394-devel@lists.sourceforge.net
Expand Down
27 changes: 2 additions & 25 deletions trunk/arch/arm/mach-omap2/board-rx51-peripherals.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <linux/gpio.h>
#include <linux/gpio_keys.h>
#include <linux/mmc/host.h>
#include <linux/power/isp1704_charger.h>

#include <plat/mcspi.h>
#include <plat/board.h>
Expand Down Expand Up @@ -54,8 +53,6 @@
#define RX51_FMTX_RESET_GPIO 163
#define RX51_FMTX_IRQ 53

#define RX51_USB_TRANSCEIVER_RST_GPIO 67

/* list all spi devices here */
enum {
RX51_SPI_WL1251,
Expand Down Expand Up @@ -114,30 +111,10 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
},
};

static void rx51_charger_set_power(bool on)
{
gpio_set_value(RX51_USB_TRANSCEIVER_RST_GPIO, on);
}

static struct isp1704_charger_data rx51_charger_data = {
.set_power = rx51_charger_set_power,
};

static struct platform_device rx51_charger_device = {
.name = "isp1704_charger",
.dev = {
.platform_data = &rx51_charger_data,
},
.name = "isp1704_charger",
};

static void __init rx51_charger_init(void)
{
WARN_ON(gpio_request_one(RX51_USB_TRANSCEIVER_RST_GPIO,
GPIOF_OUT_INIT_LOW, "isp1704_reset"));

platform_device_register(&rx51_charger_device);
}

#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)

#define RX51_GPIO_CAMERA_LENS_COVER 110
Expand Down Expand Up @@ -984,6 +961,6 @@ void __init rx51_peripherals_init(void)
if (partition)
omap2_hsmmc_init(mmc);

rx51_charger_init();
platform_device_register(&rx51_charger_device);
}

16 changes: 7 additions & 9 deletions trunk/drivers/hwmon/coretemp.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ static int get_pkg_tjmax(unsigned int cpu, struct device *dev)

static int create_name_attr(struct platform_data *pdata, struct device *dev)
{
sysfs_attr_init(&pdata->name_attr.attr);
pdata->name_attr.attr.name = "name";
pdata->name_attr.attr.mode = S_IRUGO;
pdata->name_attr.show = show_name;
Expand All @@ -373,7 +372,6 @@ static int create_core_attrs(struct temp_data *tdata, struct device *dev,
for (i = 0; i < MAX_ATTRS; i++) {
snprintf(tdata->attr_name[i], CORETEMP_NAME_LENGTH, names[i],
attr_no);
sysfs_attr_init(&tdata->sd_attrs[i].dev_attr.attr);
tdata->sd_attrs[i].dev_attr.attr.name = tdata->attr_name[i];
tdata->sd_attrs[i].dev_attr.attr.mode = S_IRUGO;
tdata->sd_attrs[i].dev_attr.show = rd_ptr[i];
Expand Down Expand Up @@ -424,7 +422,7 @@ static void update_ttarget(__u8 cpu_model, struct temp_data *tdata,
}
}

static int __devinit chk_ucode_version(struct platform_device *pdev)
static int chk_ucode_version(struct platform_device *pdev)
{
struct cpuinfo_x86 *c = &cpu_data(pdev->id);
int err;
Expand Down Expand Up @@ -511,8 +509,8 @@ static int create_core_data(struct platform_data *pdata,
/*
* Provide a single set of attributes for all HT siblings of a core
* to avoid duplicate sensors (the processor ID and core ID of all
* HT siblings of a core are the same).
* Skip if a HT sibling of this core is already registered.
* HT siblings of a core is the same).
* Skip if a HT sibling of this core is already online.
* This is not an error.
*/
if (pdata->core_data[attr_no] != NULL)
Expand Down Expand Up @@ -772,10 +770,10 @@ static void __cpuinit put_core_offline(unsigned int cpu)
coretemp_remove_core(pdata, &pdev->dev, indx);

/*
* If a HT sibling of a core is taken offline, but another HT sibling
* of the same core is still online, register the alternate sibling.
* This ensures that exactly one set of attributes is provided as long
* as at least one HT sibling of a core is online.
* If a core is taken offline, but a HT sibling of the same core is
* still online, register the alternate sibling. This ensures that
* exactly one set of attributes is provided as long as at least one
* HT sibling of a core is online.
*/
for_each_sibling(i, cpu) {
if (i != cpu) {
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/hwmon/pmbus_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,6 @@ do { \
struct sensor_device_attribute *a \
= &data->_type##s[data->num_##_type##s].attribute; \
BUG_ON(data->num_attributes >= data->max_attributes); \
sysfs_attr_init(&a->dev_attr.attr); \
a->dev_attr.attr.name = _name; \
a->dev_attr.attr.mode = _mode; \
a->dev_attr.show = _show; \
Expand Down
9 changes: 0 additions & 9 deletions trunk/drivers/power/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,6 @@ config CHARGER_ISP1704
Say Y to enable support for USB Charger Detection with
ISP1707/ISP1704 USB transceivers.

config CHARGER_MAX8903
tristate "MAX8903 Battery DC-DC Charger for USB and Adapter Power"
depends on GENERIC_HARDIRQS
help
Say Y to enable support for the MAX8903 DC-DC charger and sysfs.
The driver supports controlling charger-enable and current-limit
pins based on the status of charger connections with interrupt
handlers.

config CHARGER_TWL4030
tristate "OMAP TWL4030 BCI charger driver"
depends on TWL4030_CORE
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/power/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@ obj-$(CONFIG_CHARGER_PCF50633) += pcf50633-charger.o
obj-$(CONFIG_BATTERY_JZ4740) += jz4740-battery.o
obj-$(CONFIG_BATTERY_INTEL_MID) += intel_mid_battery.o
obj-$(CONFIG_CHARGER_ISP1704) += isp1704_charger.o
obj-$(CONFIG_CHARGER_MAX8903) += max8903_charger.o
obj-$(CONFIG_CHARGER_TWL4030) += twl4030_charger.o
obj-$(CONFIG_CHARGER_GPIO) += gpio-charger.o
11 changes: 5 additions & 6 deletions trunk/drivers/power/bq27x00_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Copyright (C) 2008 Rodolfo Giometti <giometti@linux.it>
* Copyright (C) 2008 Eurotech S.p.A. <info@eurotech.it>
* Copyright (C) 2010-2011 Lars-Peter Clausen <lars@metafoo.de>
* Copyright (C) 2011 Pali Rohár <pali.rohar@gmail.com>
*
* Based on a previous work by Copyright (C) 2008 Texas Instruments, Inc.
*
Expand Down Expand Up @@ -77,7 +76,7 @@ struct bq27x00_reg_cache {
int time_to_empty_avg;
int time_to_full;
int charge_full;
int cycle_count;
int charge_counter;
int capacity;
int flags;

Expand Down Expand Up @@ -116,7 +115,7 @@ static enum power_supply_property bq27x00_battery_props[] = {
POWER_SUPPLY_PROP_CHARGE_FULL,
POWER_SUPPLY_PROP_CHARGE_NOW,
POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN,
POWER_SUPPLY_PROP_CYCLE_COUNT,
POWER_SUPPLY_PROP_CHARGE_COUNTER,
POWER_SUPPLY_PROP_ENERGY_NOW,
};

Expand Down Expand Up @@ -268,7 +267,7 @@ static void bq27x00_update(struct bq27x00_device_info *di)
cache.time_to_empty_avg = bq27x00_battery_read_time(di, BQ27x00_REG_TTECP);
cache.time_to_full = bq27x00_battery_read_time(di, BQ27x00_REG_TTF);
cache.charge_full = bq27x00_battery_read_lmd(di);
cache.cycle_count = bq27x00_battery_read_cyct(di);
cache.charge_counter = bq27x00_battery_read_cyct(di);

if (!is_bq27500)
cache.current_now = bq27x00_read(di, BQ27x00_REG_AI, false);
Expand Down Expand Up @@ -497,8 +496,8 @@ static int bq27x00_battery_get_property(struct power_supply *psy,
case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN:
ret = bq27x00_simple_value(di->charge_design_full, val);
break;
case POWER_SUPPLY_PROP_CYCLE_COUNT:
ret = bq27x00_simple_value(di->cache.cycle_count, val);
case POWER_SUPPLY_PROP_CHARGE_COUNTER:
ret = bq27x00_simple_value(di->cache.charge_counter, val);
break;
case POWER_SUPPLY_PROP_ENERGY_NOW:
ret = bq27x00_battery_energy(di, val);
Expand Down
6 changes: 1 addition & 5 deletions trunk/drivers/power/ds2760_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ static int rated_capacities[] = {
920, /* NEC */
1440, /* Samsung */
1440, /* BYD */
#ifdef CONFIG_MACH_H4700
1800, /* HP iPAQ hx4700 3.7V 1800mAh (359113-001) */
#else
1440, /* Lishen */
#endif
1440, /* NEC */
2880, /* Samsung */
2880, /* BYD */
Expand Down Expand Up @@ -190,7 +186,7 @@ static int ds2760_battery_read_status(struct ds2760_device_info *di)

scale[0] = di->full_active_uAh;
for (i = 1; i < 5; i++)
scale[i] = scale[i - 1] + di->raw[DS2760_ACTIVE_FULL + 1 + i];
scale[i] = scale[i - 1] + di->raw[DS2760_ACTIVE_FULL + 2 + i];

di->full_active_uAh = battery_interpolate(scale, di->temp_C / 10);
di->full_active_uAh *= 1000; /* convert to µAh */
Expand Down
15 changes: 0 additions & 15 deletions trunk/drivers/power/gpio-charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,27 +161,12 @@ static int __devexit gpio_charger_remove(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_PM_SLEEP
static int gpio_charger_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct gpio_charger *gpio_charger = platform_get_drvdata(pdev);

power_supply_changed(&gpio_charger->charger);

return 0;
}
#endif

static SIMPLE_DEV_PM_OPS(gpio_charger_pm_ops, NULL, gpio_charger_resume);

static struct platform_driver gpio_charger_driver = {
.probe = gpio_charger_probe,
.remove = __devexit_p(gpio_charger_remove),
.driver = {
.name = "gpio-charger",
.owner = THIS_MODULE,
.pm = &gpio_charger_pm_ops,
},
};

Expand Down
22 changes: 0 additions & 22 deletions trunk/drivers/power/isp1704_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <linux/usb/ulpi.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
#include <linux/power/isp1704_charger.h>

/* Vendor specific Power Control register */
#define ISP1704_PWR_CTRL 0x3d
Expand Down Expand Up @@ -71,18 +70,6 @@ struct isp1704_charger {
unsigned max_power;
};

/*
* Disable/enable the power from the isp1704 if a function for it
* has been provided with platform data.
*/
static void isp1704_charger_set_power(struct isp1704_charger *isp, bool on)
{
struct isp1704_charger_data *board = isp->dev->platform_data;

if (board->set_power)
board->set_power(on);
}

/*
* Determine is the charging port DCP (dedicated charger) or CDP (Host/HUB
* chargers).
Expand Down Expand Up @@ -235,9 +222,6 @@ static void isp1704_charger_work(struct work_struct *data)

mutex_lock(&lock);

if (event != USB_EVENT_NONE)
isp1704_charger_set_power(isp, 1);

switch (event) {
case USB_EVENT_VBUS:
isp->online = true;
Expand Down Expand Up @@ -285,8 +269,6 @@ static void isp1704_charger_work(struct work_struct *data)
*/
if (isp->otg->gadget)
usb_gadget_disconnect(isp->otg->gadget);

isp1704_charger_set_power(isp, 0);
break;
case USB_EVENT_ENUMERATED:
if (isp->present)
Expand Down Expand Up @@ -412,8 +394,6 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev)
isp->dev = &pdev->dev;
platform_set_drvdata(pdev, isp);

isp1704_charger_set_power(isp, 1);

ret = isp1704_test_ulpi(isp);
if (ret < 0)
goto fail1;
Expand Down Expand Up @@ -454,7 +434,6 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev)

/* Detect charger if VBUS is valid (the cable was already plugged). */
ret = otg_io_read(isp->otg, ULPI_USB_INT_STS);
isp1704_charger_set_power(isp, 0);
if ((ret & ULPI_INT_VBUS_VALID) && !isp->otg->default_a) {
isp->event = USB_EVENT_VBUS;
schedule_work(&isp->work);
Expand All @@ -480,7 +459,6 @@ static int __devexit isp1704_charger_remove(struct platform_device *pdev)
otg_unregister_notifier(isp->otg, &isp->nb);
power_supply_unregister(&isp->psy);
otg_put_transceiver(isp->otg);
isp1704_charger_set_power(isp, 0);
kfree(isp);

return 0;
Expand Down
Loading

0 comments on commit 9ba9596

Please sign in to comment.