From: Michael Buesch <mb@bu3sch.de>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap <linux-omap@vger.kernel.org>, Felipe Balbi <balbi@ti.com>
Subject: [PATCH] cbus-retu: Add status reg bits and ADC channel definitions
Date: Sat, 26 Feb 2011 00:18:36 +0100 [thread overview]
Message-ID: <1298675916.27500.4.camel@marge> (raw)
This adds definitions for power management related
RETU_REG_STATUS bits and a list of ADC channels.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
---
Index: linux-omap-2.6/drivers/cbus/retu.h
===================================================================
--- linux-omap-2.6.orig/drivers/cbus/retu.h 2011-02-26 00:12:48.269834012 +0100
+++ linux-omap-2.6/drivers/cbus/retu.h 2011-02-26 00:12:49.828847589 +0100
@@ -40,6 +40,8 @@
#define RETU_REG_CTRL_CLR 0x0f /* Regulator clear register */
#define RETU_REG_CTRL_SET 0x10 /* Regulator set register */
#define RETU_REG_STATUS 0x16 /* Status register */
+#define RETU_REG_STATUS_BATAVAIL 0x0100 /* Battery available */
+#define RETU_REG_STATUS_CHGPLUG 0x1000 /* Charger is plugged in */
#define RETU_REG_WATCHDOG 0x17 /* Watchdog register */
#define RETU_REG_AUDTXR 0x18 /* Audio Codec Tx register */
#define RETU_REG_MAX 0x1f
@@ -57,6 +59,23 @@
#define MAX_RETU_IRQ_HANDLERS 16
+/* ADC channels */
+#define RETU_ADC_GND 0x00 /* Ground */
+#define RETU_ADC_BSI 0x01 /* Battery Size Indicator */
+#define RETU_ADC_BATTEMP 0x02 /* Battery temperature */
+#define RETU_ADC_CHGVOLT 0x03 /* Charger voltage */
+#define RETU_ADC_HEADSET 0x04 /* Headset detection */
+#define RETU_ADC_HOOKDET 0x05 /* Hook detection */
+#define RETU_ADC_RFGP 0x06 /* RF GP */
+#define RETU_ADC_WBTX 0x07 /* Wideband Tx detection */
+#define RETU_ADC_BATTVOLT 0x08 /* Battery voltage measurement */
+#define RETU_ADC_GND2 0x09 /* Ground */
+#define RETU_ADC_LIGHTSENS 0x0A /* Light sensor */
+#define RETU_ADC_LIGHTTEMP 0x0B /* Light sensor temperature */
+#define RETU_ADC_BKUPVOLT 0x0C /* Backup battery voltage */
+#define RETU_ADC_TEMP 0x0D /* RETU temperature */
+
+
int retu_read_reg(struct device *child, unsigned reg);
void retu_write_reg(struct device *child, unsigned reg, u16 val);
void retu_set_clear_reg_bits(struct device *child, unsigned reg, u16 set,
next reply other threads:[~2011-02-25 23:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 23:18 Michael Buesch [this message]
2011-02-28 8:32 ` [PATCH] cbus-retu: Add status reg bits and ADC channel definitions Felipe Balbi
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=1298675916.27500.4.camel@marge \
--to=mb@bu3sch.de \
--cc=balbi@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
/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