Re: [PATCH 6/8] power: Add support for DA9150 Charger
From: Lee Jones
Date: Mon Jun 16 2014 - 09:28:05 EST
On Wed, 11 Jun 2014, Adam Thomson wrote:
> This patch adds support for DA9150 Charger & Fuel-Guage IC Charger.
>
> Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@xxxxxxxxxxx>
> ---
> drivers/power/Kconfig | 23 ++
> drivers/power/Makefile | 1 +
> drivers/power/da9150-charger.c | 790 +++++++++++++++++++++++++++++++++++++
> include/linux/mfd/da9150/charger.h | 58 +++
> 4 files changed, 872 insertions(+)
> create mode 100644 drivers/power/da9150-charger.c
> create mode 100644 include/linux/mfd/da9150/charger.h
[...]
> diff --git a/include/linux/mfd/da9150/charger.h b/include/linux/mfd/da9150/charger.h
> new file mode 100644
> index 0000000..73c41b3
> --- /dev/null
> +++ b/include/linux/mfd/da9150/charger.h
> @@ -0,0 +1,58 @@
> +/*
> + * DA9150 MFD Driver - Charger Data
> + *
> + * Copyright (c) 2014 Dialog Semiconductor
> + *
> + * Author: Adam Thomson <Adam.Thomson.Opensource@xxxxxxxxxxx>
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.
> + */
> +
> +#ifndef _DA9150_CHARGER_H
> +#define _DA9150_CHARGER_H
Two '_'s are normally preferred.
> +#include <linux/device.h>
> +#include <linux/i2c.h>
What are you using this for?
> +#include <linux/power_supply.h>
> +#include <linux/notifier.h>
> +#include <linux/usb/otg.h>
> +#include <linux/timer.h>
> +#include <linux/iio/consumer.h>
> +
> +#include <linux/mfd/da9150/core.h>
> +
> +
Extra '\n' here.
> +struct da9150_charger_attr_map {
> + struct device_attribute attr;
> + u16 reg;
> + u8 shift;
> + u8 mask;
> +};
> +
> +/* Private data */
> +struct da9150_charger {
> + struct da9150 *da9150;
> + struct device *dev;
> +
> + struct power_supply ac;
> + struct power_supply usb;
> + struct power_supply battery;
Do you want these (or pointers to these) here?
How much space do they take up?
> + struct power_supply *supply_online;
> +
> + struct usb_phy *usb_phy;
> + struct notifier_block otg_nb;
> + struct work_struct otg_work;
> + unsigned long usb_event;
> +
> + struct iio_channel *ibus_chan;
> + struct iio_channel *vbus_chan;
> + struct iio_channel *tjunc_chan;
> + struct iio_channel *vbat_chan;
> +
> + bool invalid_tbat;
> +};
> +
> +#endif /* _DA9150_CHARGER_H */
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/