[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZu6HC3S=p4f1rfETGZroXicMuCU0e9Y8=CtQiOq7Q+UQ@mail.gmail.com>
Date: Wed, 12 Mar 2014 15:40:35 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Jenny TC <jenny.tc@...el.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
Anton Vorontsov <cbouatmailru@...il.com>,
Anton Vorontsov <anton.vorontsov@...aro.org>,
Kim Milo <Milo.Kim@...com>, Lee Jones <lee.jones@...aro.org>,
Jingoo Han <jg1.han@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Sachin Kamat <sachin.kamat@...aro.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Pali Rohár <pali.rohar@...il.com>,
Rhyland Klein <rklein@...dia.com>, Pavel Machek <pavel@....cz>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
David Woodhouse <dwmw2@...radead.org>,
Tony Lindgren <tony@...mide.com>,
Russell King <linux@....linux.org.uk>,
Sebastian Reichel <sre@...g0.de>,
Aaro Koskinen <aaro.koskinen@....fi>,
Pallala Ramakrishna <ramakrishna.pallala@...el.com>,
Ивайло Димитров <freemangordon@....bg>,
Linux-OMAP <linux-omap@...r.kernel.org>
Subject: Re: [PATCHv8 2/4] power_supply: Introduce generic psy charging driver
On Fri, Mar 7, 2014 at 6:29 AM, Jenny TC <jenny.tc@...el.com> wrote:
> +enum psy_charger_cable_type {
> + PSY_CHARGER_CABLE_TYPE_NONE = 0,
> + PSY_CHARGER_CABLE_TYPE_USB_SDP = 1 << 0,
> + PSY_CHARGER_CABLE_TYPE_USB_DCP = 1 << 1,
> + PSY_CHARGER_CABLE_TYPE_USB_CDP = 1 << 2,
> + PSY_CHARGER_CABLE_TYPE_USB_ACA = 1 << 3,
> + PSY_CHARGER_CABLE_TYPE_AC = 1 << 4,
> + PSY_CHARGER_CABLE_TYPE_ACA_DOCK = 1 << 5,
> + PSY_CHARGER_CABLE_TYPE_ACA_A = 1 << 6,
> + PSY_CHARGER_CABLE_TYPE_ACA_B = 1 << 7,
> + PSY_CHARGER_CABLE_TYPE_ACA_C = 1 << 8,
> + PSY_CHARGER_CABLE_TYPE_SE1 = 1 << 9,
> + PSY_CHARGER_CABLE_TYPE_MHL = 1 << 10,
> + PSY_CHARGER_CABLE_TYPE_B_DEVICE = 1 << 11,
> +};
I still disagree with using an enum as bitfield.
Atleast
#include <linux/bitops.h>
and use BIT(0), BIT(1) etc to define the bits.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists