From: dbaryshkov@gmail.com (Dmitry Eremin-Solenikov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] ARM: pxa: add gpio-charger configuration on poodle
Date: Mon, 30 Mar 2015 13:39:29 +0300 [thread overview]
Message-ID: <1427711971-8164-1-git-send-email-dbaryshkov@gmail.com> (raw)
Add declration of gpio-charger device for Sharp SL-5600 poodle device.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
arch/arm/mach-pxa/poodle.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 6002112..4dd29a7 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -31,6 +31,7 @@
#include <linux/spi/ads7846.h>
#include <linux/spi/pxa2xx_spi.h>
#include <linux/mtd/sharpsl.h>
+#include <linux/power/gpio-charger.h>
#include <linux/memblock.h>
#include <linux/iio/machine.h>
#include <linux/mfd/locomo.h>
@@ -413,12 +414,31 @@ static struct platform_device sharpsl_rom_device = {
.dev.platform_data = &sharpsl_rom_data,
};
+static char *poodle_ac_supplied_to[] = {
+ "main-battery",
+};
+
+static struct gpio_charger_platform_data poodle_power_data = {
+ .name = "charger",
+ .type = POWER_SUPPLY_TYPE_MAINS,
+ .gpio = POODLE_GPIO_AC_IN,
+ .supplied_to = poodle_ac_supplied_to,
+ .num_supplicants = ARRAY_SIZE(poodle_ac_supplied_to),
+};
+
+static struct platform_device poodle_power_device = {
+ .name = "gpio-charger",
+ .id = -1,
+ .dev.platform_data = &poodle_power_data,
+};
+
static struct platform_device *devices[] __initdata = {
&poodle_locomo_device,
&poodle_scoop_device,
&poodle_audio_device,
&sharpsl_nand_device,
&sharpsl_rom_device,
+ &poodle_power_device,
};
static struct i2c_board_info __initdata poodle_i2c_devices[] = {
--
2.1.4
next reply other threads:[~2015-03-30 10:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 10:39 Dmitry Eremin-Solenikov [this message]
2015-03-30 10:39 ` [PATCH 2/3] ARM: pxa: poodle: add gpio-keys configuration Dmitry Eremin-Solenikov
2015-03-30 10:39 ` [PATCH 3/3] ARM: pxa: declare battery device on poodle Dmitry Eremin-Solenikov
2015-04-03 19:29 ` Robert Jarzmik
2015-04-03 19:32 ` Dmitry Eremin-Solenikov
2015-04-03 19:16 ` [PATCH 1/3] ARM: pxa: add gpio-charger configuration " Robert Jarzmik
2015-04-03 19:23 ` Dmitry Eremin-Solenikov
2015-06-19 18:43 ` Robert Jarzmik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427711971-8164-1-git-send-email-dbaryshkov@gmail.com \
--to=dbaryshkov@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).