Re: [PATCHv8 2/4] power_supply: Introduce generic psy charging driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 7, 2014 at 6:29 AM, Jenny TC <jenny.tc@xxxxxxxxx> 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-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux