linux-aspeed.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH 4/4] gpio: aspeed: Add interfaces for co-processor to grab GPIOs
Date: Fri, 15 Jun 2018 16:04:14 +1000	[thread overview]
Message-ID: <ac48488f1e92b7dabffa38977151b6c457565f0e.camel@kernel.crashing.org> (raw)
In-Reply-To: <CACPK8XcPdf-=Xr0LRDR9=VjUHgOmTujG1TYsNEoAS31ZUP4+EQ@mail.gmail.com>


> > +
> > +/**
> > + * aspeed_gpio_copro_grab_gpio - Mark a GPIO used by the coprocessor. The entire
> > + *                               bank gets marked and any access from the ARM will
> > + *                               result in handshaking via callbacks.
> > + * @desc: The GPIO to be marked
> > + */
> > +int aspeed_gpio_copro_grab_gpio(struct gpio_desc *desc)
> > +{
> > +       struct gpio_chip *chip = gpiod_to_chip(desc);
> > +       struct aspeed_gpio *gpio = gpiochip_get_data(chip);
> > +       int rc = 0, bindex, offset = gpio_chip_hwgpio(desc);
> > +       const struct aspeed_gpio_bank *bank = to_bank(offset);
> > +       unsigned long flags;
> > +
> > +       if (!gpio->cf_copro_bankmap)
> > +               gpio->cf_copro_bankmap = kzalloc(gpio->config->nr_gpios >> 3, GFP_KERNEL);
> 
> Someone should free this.

Actually no. The driver doesn't have a remove(), so it doesn't.

Cheers,
Ben.

  parent reply	other threads:[~2018-06-15  6:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12  0:10 [PATCH 0/4] gpio: aspeed: Fixes and support for sharing with co-processor Benjamin Herrenschmidt
2018-06-12  0:10 ` [PATCH 1/4] gpio: aspeed: Rework register type accessors Benjamin Herrenschmidt
2018-06-12  4:49   ` Benjamin Herrenschmidt
2018-06-12  0:10 ` [PATCH 2/4] gpio: aspeed: Add "Read Data" register to read the write latch Benjamin Herrenschmidt
2018-06-12  5:38   ` Joel Stanley
2018-06-12  7:18     ` Benjamin Herrenschmidt
2018-06-12  0:10 ` [PATCH 3/4] gpio: aspeed: Add command source registers Benjamin Herrenschmidt
2018-06-12  5:38   ` Joel Stanley
2018-06-12  0:10 ` [PATCH 4/4] gpio: aspeed: Add interfaces for co-processor to grab GPIOs Benjamin Herrenschmidt
2018-06-12  5:37   ` Joel Stanley
2018-06-12  7:17     ` Benjamin Herrenschmidt
2018-06-15  6:04     ` Benjamin Herrenschmidt [this message]
2018-06-14  8:59   ` Linus Walleij
2018-06-14 23:40     ` Benjamin Herrenschmidt
2018-06-28 13:42       ` Linus Walleij
2018-06-28 23:53         ` Benjamin Herrenschmidt
2018-06-14  9:01 ` [PATCH 0/4] gpio: aspeed: Fixes and support for sharing with co-processor Linus Walleij
2018-06-14 23:42   ` Benjamin Herrenschmidt

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=ac48488f1e92b7dabffa38977151b6c457565f0e.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).