From: Felipe Balbi <me@felipebalbi.com>
To: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 2/7] Add defines and data types for twl4030.
Date: Sat, 11 Oct 2008 21:46:48 +0300 [thread overview]
Message-ID: <20081011184648.GB20247@frodo> (raw)
In-Reply-To: <1223657776-16544-3-git-send-email-peter.de-schrijver@nokia.com>
On Fri, Oct 10, 2008 at 07:56:11PM +0300, Peter 'p2' De Schrijver wrote:
> This patch adds a bunch of data types and defines to handle the twl4030 power sequence scripts.
>
> Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
Should Cc Sam Ortiz
> ---
> include/linux/i2c/twl4030.h | 64 +++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 64 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h
> index cdb4531..7dc4ee1 100644
> --- a/include/linux/i2c/twl4030.h
> +++ b/include/linux/i2c/twl4030.h
> @@ -264,6 +264,69 @@ struct twl4030_usb_data {
> enum twl4030_usb_mode usb_mode;
> };
>
> +struct twl4030_ins {
> + u16 pmb_message;
> + u8 delay;
> +};
> +
> +struct twl4030_script {
> + struct twl4030_ins *script;
> + unsigned size;
> + u8 flags;
> +};
add a blank like here
> +#define TRITON_WRST_SCRIPT (1<<0)
> +#define TRITON_WAKEUP12_SCRIPT (1<<1)
> +#define TRITON_WAKEUP3_SCRIPT (1<<2)
> +#define TRITON_SLEEP_SCRIPT (1<<3)
> +
> +struct twl4030_power_data {
> + struct twl4030_script **scripts;
> + unsigned size;
> +};
> +
> +/* Power bus message definitions */
> +
> +#define DEV_GRP_NULL 0x0
> +#define DEV_GRP_P1 0x1
> +#define DEV_GRP_P2 0x2
> +#define DEV_GRP_P3 0x4
> +
> +#define RES_GRP_RES 0x0
> +#define RES_GRP_PP 0x1
> +#define RES_GRP_RC 0x2
> +#define RES_GRP_PP_RC 0x3
> +#define RES_GRP_PR 0x4
> +#define RES_GRP_PP_PR 0x5
> +#define RES_GRP_RC_PR 0x6
> +#define RES_GRP_ALL 0x7
> +
> +#define RES_TYPE2_R0 0x0
> +
> +#define RES_TYPE_ALL 0x7
> +
> +#define RES_STATE_WRST 0xF
> +#define RES_STATE_ACTIVE 0xE
> +#define RES_STATE_SLEEP 0x8
> +#define RES_STATE_OFF 0x0
> +
> +/*
> +* Power Bus Message Format
> +*
> +* Broadcast Message (16 Bits)
> +* DEV_GRP[15:13] MT[12] RES_GRP[11:9] RES_TYPE2[8:7] RES_TYPE[6:4]
> +* RES_STATE[3:0]
> +*
> +* Singular Message (16 Bits)
> +* DEV_GRP[15:13] MT[12] RES_ID[11:4] RES_STATE[3:0]
> +*
> +*/
I'd fix this comment style. The * should be aligned with the first one.
> +
> +#define MSG_BROADCAST(devgrp, grp, type, type2, state) \
> + (devgrp << 13 | 1 << 12 | grp << 9 | type2 << 7 | type << 4 | state)
> +
> +#define MSG_SINGULAR(devgrp, id, state) \
> + (devgrp << 13 | 0 << 12 | id << 4 | state)
> +
> struct twl4030_platform_data {
> unsigned irq_base, irq_end;
> struct twl4030_bci_platform_data *bci;
> @@ -271,6 +334,7 @@ struct twl4030_platform_data {
> struct twl4030_madc_platform_data *madc;
> struct twl4030_keypad_data *keypad;
> struct twl4030_usb_data *usb;
> + struct twl4030_power_data *power;
>
> /* REVISIT more to come ... _nothing_ should be hard-wired */
> };
--
balbi
next prev parent reply other threads:[~2008-10-11 18:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-10 16:56 [PATCH 0/7] Integrate the twl4030 power code into new twl4030 mfd Peter 'p2' De Schrijver
2008-10-10 16:56 ` [PATCH 1/7] Remove existing twl4030 power script code Peter 'p2' De Schrijver
2008-10-10 16:56 ` [PATCH 2/7] Add defines and data types for twl4030 Peter 'p2' De Schrijver
2008-10-10 16:56 ` [PATCH 3/7] Twl4030 power code updated for new twl4030 core Peter 'p2' De Schrijver
2008-10-10 16:56 ` [PATCH 4/7] Hook twl4030 power code into " Peter 'p2' De Schrijver
2008-10-10 16:56 ` [PATCH 5/7] 3430sdp and ldp use custom twl4030 power scripts Peter 'p2' De Schrijver
2008-10-10 16:56 ` [PATCH 6/7] Generic twl4030 power script for 3430 based boards Peter 'p2' De Schrijver
2008-10-10 16:56 ` [PATCH 7/7] omap3 evm, beagle and overo use the generic twl4030 script Peter 'p2' De Schrijver
2008-10-10 17:50 ` David Brownell
2008-10-13 8:23 ` Peter 'p2' De Schrijver
2008-10-14 16:26 ` David Brownell
2008-10-10 17:53 ` [PATCH 5/7] 3430sdp and ldp use custom twl4030 power scripts David Brownell
2008-10-13 8:45 ` Peter 'p2' De Schrijver
2008-10-14 16:28 ` David Brownell
2008-10-10 17:57 ` [PATCH 4/7] Hook twl4030 power code into twl4030 core David Brownell
2008-10-11 18:50 ` Felipe Balbi
2008-10-20 22:27 ` Samuel Ortiz
2008-10-11 18:49 ` [PATCH 3/7] Twl4030 power code updated for new " Felipe Balbi
2008-10-11 18:46 ` Felipe Balbi [this message]
2008-10-11 18:45 ` [PATCH 1/7] Remove existing twl4030 power script code Felipe Balbi
-- strict thread matches above, loose matches on Subject: below --
2008-10-13 15:44 [PATCH 0/7] Integrate the twl4030 power code into new twl4030 mfd Peter 'p2' De Schrijver
2008-10-13 15:44 ` [PATCH 1/7] Remove existing twl4030 power script code Peter 'p2' De Schrijver
2008-10-13 15:44 ` [PATCH 2/7] Add defines and data types for twl4030 Peter 'p2' De Schrijver
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=20081011184648.GB20247@frodo \
--to=me@felipebalbi.com \
--cc=linux-omap@vger.kernel.org \
--cc=peter.de-schrijver@nokia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.