Hi Michael,
I think there is more wrong than just that. Attached is a patch to
cleanup the moved code from bq2700_battery.c. I'm also not seeing the
ALSA device, are you?
[21474540.495000] Advanced Linux Sound Architecture Driver Version 1.0.18a.
[21474540.510000] No device for DAI s3c24xx-i2s
[21474540.525000] ALSA device list:
[21474540.525000] No soundcards found.
Michael Trimarchi wrote:
Hi,
I have two problem with the new-andytracking.
One is that the DAI is not registered and the other one
Why two spi driver?
<4>[21474540.275000] WARNING: at
/home/michael/lavoro/moko/android/linux-2.6/fs/
sysfs/dir.c:462 sysfs_add_one+0x30/0x44()^M
<4>[21474540.280000] sysfs: duplicate filename 'ac' can not be created^M
<4>[21474540.285000] Modules linked in:^M
<4>[21474540.295000] [<c0034960>] (dump_stack+0x0/0x14) from
[<c0052270>] (warn_
slowpath+0x6c/0x88)^M
<4>[21474540.300000] [<c0052204>] (warn_slowpath+0x0/0x88) from
[<c00f85e8>] (sy
sfs_add_one+0x30/0x44)^M
<4>[21474540.305000] r3:c7a1ee80 r2:c046d3c0^M
<4>[21474540.310000] r7:c7a1fa68 r6:fffffff4 r5:c7a204b0 r4:ffffffef^M
<4>[21474540.315000] [<c00f85b8>] (sysfs_add_one+0x0/0x44) from
[<c00f8d54>] (cr
eate_dir+0x58/0xa8)^M
<4>[21474540.320000] r5:c781fb08 r4:c7a204b0^M
<4>[21474540.325000] [<c00f8cfc>] (create_dir+0x0/0xa8) from
[<c00f8de4>] (sysfs
_create_dir+0x40/0x60)^M
<4>[21474540.335000] r8:00000000 r7:c7a1fa68 r6:c78ad62c r5:c7a1eea0
r4:c7a1fa6
8^M
<4>[21474540.345000] [<c00f8da4>] (sysfs_create_dir+0x0/0x60) from
[<c01afb70>]
(create_dir+0x24/0x48)^M
<4>[21474540.350000] r4:c7a1fa68^M
<4>[21474540.355000] [<c01afb4c>]
I think the
pcf50633-charger.c
and
drivers/power/bq27000_battery.c
The kernel can't duplicate the entry.
diff --git a/drivers/power/bq27000_battery.c b/drivers/power/bq27000_battery.c
index ccd56ea..bc2bd1c 100644
--- a/drivers/power/bq27000_battery.c
+++ b/drivers/power/bq27000_battery.c
@@ -336,54 +336,6 @@ static void bq27000_battery_work(struct work_struct *work)
dev_err(di->dev, "battery service reschedule failed\n");
}
-static int ac_get_property(struct power_supply *psy,
- enum power_supply_property psp,
- union power_supply_propval *val)
-{
- int ret = 0;
- struct bq27000_device_info *di = container_of(psy, struct bq27000_device_info, ac);
-
- if (!(di->pdata->hdq_initialized)())
- return -EINVAL;
-
- switch (psp) {
- case POWER_SUPPLY_PROP_ONLINE:
- if (di->pdata->get_charger_online_status)
- val->intval = (di->pdata->get_charger_online_status)();
- else
- return -EINVAL;
- break;
- default:
- ret = -EINVAL;
- break;
- }
- return ret;
-}
-
-static int usb_get_property(struct power_supply *psy,
- enum power_supply_property psp,
- union power_supply_propval *val)
-{
- int ret = 0;
- struct bq27000_device_info *di = container_of(psy, struct bq27000_device_info, usb);
-
- if (!(di->pdata->hdq_initialized)())
- return -EINVAL;
-
- switch (psp) {
- case POWER_SUPPLY_PROP_ONLINE:
- if (di->pdata->get_charger_online_status)
- val->intval = (di->pdata->get_charger_online_status)();
- else
- return -EINVAL;
- break;
- default:
- ret = -EINVAL;
- break;
- }
- return ret;
-}
-
static enum power_supply_property bq27000_battery_props[] = {
POWER_SUPPLY_PROP_STATUS,
POWER_SUPPLY_PROP_HEALTH,
@@ -399,10 +351,6 @@ static enum power_supply_property bq27000_battery_props[] = {
POWER_SUPPLY_PROP_ONLINE
};
-static enum power_supply_property power_props[] = {
- POWER_SUPPLY_PROP_ONLINE,
-};
-
static int bq27000_battery_probe(struct platform_device *pdev)
{
int retval = 0;
@@ -432,36 +380,12 @@ static int bq27000_battery_probe(struct platform_device *pdev)
di->bat.use_for_apm = 1;
di->pdata = pdata;
- di->ac.name = "ac";
- di->ac.type = POWER_SUPPLY_TYPE_MAINS;
- di->ac.properties = power_props;
- di->ac.num_properties = ARRAY_SIZE(power_props);
- di->ac.get_property = ac_get_property;
-
- di->usb.name = "usb";
- di->usb.type = POWER_SUPPLY_TYPE_USB;
- di->usb.properties = power_props;
- di->usb.num_properties = ARRAY_SIZE(power_props);
- di->usb.get_property = usb_get_property;
-
retval = power_supply_register(&pdev->dev, &di->bat);
if (retval) {
dev_err(di->dev, "failed to register battery\n");
goto batt_failed;
}
- retval = power_supply_register(&pdev->dev, &di->ac);
- if (retval) {
- dev_err(di->dev, "failed to register ac\n");
- goto ac_failed;
- }
-
- retval = power_supply_register(&pdev->dev, &di->usb);
- if (retval) {
- dev_err(di->dev, "failed to register usb\n");
- goto usb_failed;
- }
-
INIT_DELAYED_WORK(&di->work, bq27000_battery_work);
if (!schedule_delayed_work(&di->work, 0))
@@ -469,10 +393,6 @@ static int bq27000_battery_probe(struct platform_device *pdev)
return 0;
-usb_failed:
- power_supply_unregister(&di->ac);
-ac_failed:
- power_supply_unregister(&di->bat);
batt_failed:
kfree(di);
di_alloc_failed:
@@ -486,8 +406,6 @@ static int bq27000_battery_remove(struct platform_device *pdev)
cancel_delayed_work(&di->work);
power_supply_unregister(&di->bat);
- power_supply_unregister(&di->ac);
- power_supply_unregister(&di->usb);
return 0;
}
@@ -498,9 +416,6 @@ void bq27000_charging_state_change(struct platform_device *pdev)
if (!di)
return;
-
- power_supply_changed(&di->ac);
- power_supply_changed(&di->usb);
}
EXPORT_SYMBOL_GPL(bq27000_charging_state_change);