lkml.org 
[lkml]   [2010]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 1/2] msm: gpio: Add v2 gpio support to MSM SoCs.
    Hi Gregory,

    On Mon, Nov 15, 2010 at 12:20:18PM -0800, Gregory Bean wrote:
    > Beginning with the MSM8x60, the hardware block responsible for gpio
    > support changes. Provide gpiolib support for the new v2 architecture.
    >
    > Cc: Baruch Siach <baruch@tkos.co.il>
    > Signed-off-by: Gregory Bean <gbean@codeaurora.org>
    > ---

    [snip]

    > +struct msm_gpio_dev {
    > + struct gpio_chip gpio_chip;
    > +};

    This wrapper struct seems redundant. You only use it in msm_gpio_probe, where
    you can just use 'struct gpio_chip' directly.

    > +static DEFINE_SPINLOCK(tlmm_lock);
    > +
    > +static inline struct msm_gpio_dev *to_msm_gpio_dev(struct gpio_chip *chip)
    > +{
    > + return container_of(chip, struct msm_gpio_dev, gpio_chip);
    > +}

    Not used.

    > +static inline void set_gpio_bits(unsigned n, void __iomem *reg)
    > +{
    > + writel(readl(reg) | n, reg);
    > +}

    Move the locking in, or better, eliminate it, since it's only used in
    msm_gpio_direction_output.

    [snip]

    > +static struct platform_device msm_device_gpio = {
    > + .name = "msmgpio",
    > + .id = 0,

    Redundant.

    > +};

    baruch

    --
    ~. .~ Tk Open Systems
    =}------------------------------------------------ooO--U--Ooo------------{=
    - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -


    \
     
     \ /
      Last update: 2010-11-16 06:35    [W:0.020 / U:14.140 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site