From: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Matti Vaittinen <mazziesaccount@gmail.com>,
heikki.haikola@fi.rohmeurope.com,
mikko.mutanen@fi.rohmeurope.com, Lee Jones <lee.jones@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mark Brown <broonie@kernel.org>,
Greg KH <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Sebastian Reichel <sre@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Guenter Roeck <linux@roeck-us.net>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-clk <linux-clk@vger.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>,
linux-rtc@vger.kernel.org,
LINUXWATCHDOG <linux-watchdog@vger.kernel.org>
Subject: Re: [RFC PATCH v4 07/10] gpio: Initial support for ROHM bd70528 GPIO block
Date: Mon, 4 Feb 2019 14:25:11 +0200 [thread overview]
Message-ID: <20190204122511.GG23791@localhost.localdomain> (raw)
In-Reply-To: <CACRpkdauoQ=qcFUi7wTUKu22ZHeq=g0grWqvZz1gfOt0=dXrbw@mail.gmail.com>
On Mon, Feb 04, 2019 at 12:29:53PM +0100, Linus Walleij wrote:
> On Thu, Jan 31, 2019 at 1:08 PM Matti Vaittinen
> <matti.vaittinen@fi.rohmeurope.com> wrote:
>
> > ROHM BD70528 PMIC has 4 GPIO pins. Allow them to be
> > controlled by GPIO framework.
> >
> > IRQs are handled by regmap-irq and GPIO driver is not
> > aware of the irq usage.
> >
> > Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> (...)
> > I dropped the review-by from Linus Walleij because I would like to
> > get a comment on if locking is required when we check the direction
> > in order to detect the correct register for getting the pin state.
>
> I don't know that. You isn't regmap locking inherently?
This direction fetching and then the value reading are two separate
operations at regmap-level. I guess the regmap can't be holding any
locks during two indpendent operations.
>
> > My initial feeling is that locking makes no sense.
>
> Mine too.
Yep. I change the comment to explain why I think this race condition
is Ok. We can fix it if it ever turns out to be an issue.
>
> > + bdgpio->gpio.get_direction = &bd70528_get_direction;
> > + bdgpio->gpio.direction_input = &bd70528_direction_input;
> > + bdgpio->gpio.direction_output = &bd70528_direction_output;
> > + bdgpio->gpio.set_config = &bd70528_gpio_set_config;
> > + bdgpio->gpio.can_sleep = true;
> > + bdgpio->gpio.get = &bd70528_gpio_get;
> > + bdgpio->gpio.set = &bd70528_gpio_set;
>
> Drop the &ersand in from of the functions. All functions
> are pointers.
Yes they are. This & in front of functions when initializing a pointer
with their addresss is my old habit. I liked to consistently use & when
taking address of any beast, whether it was a variable or function.
Getting rid of old habits is not so easy :/ I'll clean thisi at v5 and
put back your Reviewed-by =) Thanks
>
> With that:
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
> Yours,
> Linus Walleij
--
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND
~~~ "I don't think so," said Rene Descartes. Just then, he vanished ~~~
WARNING: multiple messages have this Message-ID (diff)
From: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Matti Vaittinen <mazziesaccount@gmail.com>,
heikki.haikola@fi.rohmeurope.com,
mikko.mutanen@fi.rohmeurope.com, Lee Jones <lee.jones@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mark Brown <broonie@kernel.org>,
Greg KH <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Sebastian Reichel <sre@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Guenter Roeck <linux@roeck-us.net>,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Subject: Re: [RFC PATCH v4 07/10] gpio: Initial support for ROHM bd70528 GPIO block
Date: Mon, 4 Feb 2019 14:25:11 +0200 [thread overview]
Message-ID: <20190204122511.GG23791@localhost.localdomain> (raw)
In-Reply-To: <CACRpkdauoQ=qcFUi7wTUKu22ZHeq=g0grWqvZz1gfOt0=dXrbw@mail.gmail.com>
On Mon, Feb 04, 2019 at 12:29:53PM +0100, Linus Walleij wrote:
> On Thu, Jan 31, 2019 at 1:08 PM Matti Vaittinen
> <matti.vaittinen@fi.rohmeurope.com> wrote:
>
> > ROHM BD70528 PMIC has 4 GPIO pins. Allow them to be
> > controlled by GPIO framework.
> >
> > IRQs are handled by regmap-irq and GPIO driver is not
> > aware of the irq usage.
> >
> > Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> (...)
> > I dropped the review-by from Linus Walleij because I would like to
> > get a comment on if locking is required when we check the direction
> > in order to detect the correct register for getting the pin state.
>
> I don't know that. You isn't regmap locking inherently?
This direction fetching and then the value reading are two separate
operations at regmap-level. I guess the regmap can't be holding any
locks during two indpendent operations.
>
> > My initial feeling is that locking makes no sense.
>
> Mine too.
Yep. I change the comment to explain why I think this race condition
is Ok. We can fix it if it ever turns out to be an issue.
>
> > + bdgpio->gpio.get_direction = &bd70528_get_direction;
> > + bdgpio->gpio.direction_input = &bd70528_direction_input;
> > + bdgpio->gpio.direction_output = &bd70528_direction_output;
> > + bdgpio->gpio.set_config = &bd70528_gpio_set_config;
> > + bdgpio->gpio.can_sleep = true;
> > + bdgpio->gpio.get = &bd70528_gpio_get;
> > + bdgpio->gpio.set = &bd70528_gpio_set;
>
> Drop the &ersand in from of the functions. All functions
> are pointers.
Yes they are. This & in front of functions when initializing a pointer
with their addresss is my old habit. I liked to consistently use & when
taking address of any beast, whether it was a variable or function.
Getting rid of old habits is not so easy :/ I'll clean thisi at v5 and
put back your Reviewed-by =) Thanks
>
> With that:
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
> Yours,
> Linus Walleij
--
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND
~~~ "I don't think so," said Rene Descartes. Just then, he vanished ~~~
next prev parent reply other threads:[~2019-02-04 12:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 12:01 [RFC PATCH v4 00/10] support ROHM BD70528 PMIC Matti Vaittinen
2019-01-31 12:02 ` [RFC PATCH v4 01/10] mfd: bd718x7.h split to ROHM common and bd718x7 specific parts Matti Vaittinen
2019-01-31 12:02 ` [RFC PATCH v4 02/10] regulator: bd718x7 use chip specific and generic data structs Matti Vaittinen
2019-01-31 12:03 ` [RFC PATCH v4 03/10] clk: bd718x7: " Matti Vaittinen
2019-01-31 12:03 ` [RFC PATCH v4 04/10] mfd: bd70528: Support ROHM bd70528 PMIC - core Matti Vaittinen
2019-01-31 12:04 ` [RFC PATCH v4 05/10] clk: bd718x7: Support ROHM BD70528 clk block Matti Vaittinen
2019-01-31 12:04 ` [RFC PATCH v4 06/10] devicetree: bindings: Document first ROHM BD70528 bindings Matti Vaittinen
2019-01-31 21:09 ` Rob Herring
2019-01-31 21:09 ` Rob Herring
2019-02-04 11:25 ` Linus Walleij
2019-02-04 11:25 ` Linus Walleij
2019-01-31 12:08 ` [RFC PATCH v4 07/10] gpio: Initial support for ROHM bd70528 GPIO block Matti Vaittinen
2019-02-04 11:29 ` Linus Walleij
2019-02-04 11:29 ` Linus Walleij
2019-02-04 12:25 ` Matti Vaittinen [this message]
2019-02-04 12:25 ` Matti Vaittinen
2019-02-04 12:53 ` Bartosz Golaszewski
2019-02-04 12:53 ` Bartosz Golaszewski
2019-01-31 12:11 ` [RFC PATCH v4 08/10] rtc: bd70528: Initial support for ROHM bd70528 RTC Matti Vaittinen
2019-01-31 12:12 ` [RFC PATCH v4 09/10] power: supply: Initial support for ROHM BD70528 PMIC charger block Matti Vaittinen
2019-01-31 12:12 ` [RFC PATCH v4 10/10] watchdog: bd70528: Initial support for ROHM BD70528 watchdog block Matti Vaittinen
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=20190204122511.GG23791@localhost.localdomain \
--to=matti.vaittinen@fi.rohmeurope.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=bgolaszewski@baylibre.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.haikola@fi.rohmeurope.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mark.rutland@arm.com \
--cc=mazziesaccount@gmail.com \
--cc=mikko.mutanen@fi.rohmeurope.com \
--cc=mturquette@baylibre.com \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=sre@kernel.org \
--cc=wim@linux-watchdog.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 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.