From: Dan O'Donovan <dan.odonovan@emutex.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
Dan O'Donovan <dan.odonovan@emutex.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
"Krogerus, Heikki" <heikki.krogerus@linux.intel.com>,
Lee Jones <lee.jones@linaro.org>,
Linus Walleij <linus.walleij@linaro.org>,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Pavel Machek <pavel@ucw.cz>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Linux LED Subsystem <linux-leds@vger.kernel.org>,
Carlos Iglesias <carlos.iglesias@emutex.com>
Subject: Re: [PATCH v2 1/3] mfd: upboard: Add UP2 platform controller driver
Date: Wed, 31 Oct 2018 20:40:45 +0000 [thread overview]
Message-ID: <cdf91d51-dfb5-b2dc-99af-60954cf32255@emutex.com> (raw)
In-Reply-To: <CAHp75VdkwfcPdSmB0dYBF_xwwXMqkrLOa1tL0xkOJ4DVcx8h8g@mail.gmail.com>
On 10/20/2018 12:49 PM, Andy Shevchenko wrote:
> On Fri, Oct 19, 2018 at 8:26 PM Dan O'Donovan <dan@emutex.com> wrote:
>> From: Javier Arteaga <javier@emutex.com>
>>
>> UP Squared (UP2) is a x86 SBC from AAEON based on Intel Apollo Lake. It
>> features a MAX 10 FPGA that routes lines from both SoC and on-board
>> devices to two I/O headers:
>>
>> +------------------------+
>> | 40-pin RPi-like header |
>> +------| (HAT) |
>> | +------------------------+
>> +-------+ +--------+
>> | | | | +------------------------+
>> | SoC |----| FPGA |-----| Custom UP2 pin header |
>> | | | | | (EXHAT) |
>> +-------+ +--------+ +------------------------+
>> |
>> +------* On-board devices: LED, VLS...
>>
>> This is intended to enable vendor-specific applications to customize I/O
>> header pinout, as well as include low-latency functionality. It also
>> performs voltage level translation between the SoC (1.8V) and HAT header
>> (3.3V).
>>
>> Out of the box, this block implements a platform controller with a
>> GPIO-bitbanged control interface. It's enumerated by ACPI and provides
>> registers to control:
>>
>> - Configuration of all FPGA-routed header lines. These can be driven
>> SoC-to-header, header-to-SoC or set in high impedance.
>>
>> - On-board LEDs and enable lines for other platform devices.
>>
>> Add core support for this platform controller as a MFD device, exposing
>> these registers as a regmap.
> Can we see a link to or an excerpt of ACPI table for this device?
Sure: https://gist.github.com/Dan-Emutex/6382c25f4b8b8cdd80e6056889cdf48b
I'll add this to the cover letter for v3 as well.
>
>> +#define set_clear(u, x) gpiod_set_value((u)->clear_gpio, (x))
>> +#define set_strobe(u, x) gpiod_set_value((u)->strobe_gpio, (x))
>> +#define set_datain(u, x) gpiod_set_value((u)->datain_gpio, (x))
>> +#define get_dataout(u) gpiod_get_value((u)->dataout_gpio)
> I think these macros don't bring much value. (Up to you and Lee to decide)
These were added in response to one of your review comments on the original patch-set ;)
I think they do slightly improve the code readability so I'll leave them there if there are no objections.
>
>
>> +static void __reg_io_write(const struct upboard_ddata * const ddata,
>> + unsigned int size, unsigned int val)
>> +{
>> + int i;
>> +
>> + /*
>> + * DATAIN is latched on each rising edge of the STROBE signal.
>> + * Data (register address or value) is sent MSb first.
>> + */
>> + for (i = size - 1; i >= 0; i--) {
> while (size--)
Yep, much neater. I'll change that, thanks! Ditto for the other comments on this file.+ ret = upboard_init_gpio(dev);
>> + if (ret) {
>> + if (ret != -EPROBE_DEFER)
>> + dev_err(dev, "failed to init GPIOs: %d", ret);
>> + return ret;
>> + }
> I don't know if probe_err() helper is going to be a part of v4.21
> (which this series targets), it would be good to use it.
I left this out for now in case it causes any awkwardness with merging. Hope that's ok.
next prev parent reply other threads:[~2018-10-31 20:40 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-21 8:50 [RFC PATCH RESEND 0/3] UP Squared board drivers Javier Arteaga
2018-04-21 8:50 ` [RFC PATCH RESEND 1/3] mfd: upboard: Add UP2 platform controller driver Javier Arteaga
2018-04-25 9:51 ` Mika Westerberg
2018-04-25 12:05 ` Javier Arteaga
2018-04-25 15:57 ` Andy Shevchenko
2018-04-26 2:33 ` Javier Arteaga
2018-04-21 8:50 ` [RFC PATCH RESEND 2/3] leds: upboard: Add LED support Javier Arteaga
2018-04-25 6:41 ` Pavel Machek
2018-04-25 7:02 ` Javier Arteaga
2018-04-25 7:04 ` Pavel Machek
2018-04-25 16:15 ` Andy Shevchenko
2018-04-26 2:34 ` Javier Arteaga
2018-04-26 7:55 ` Andy Shevchenko
2018-04-26 12:49 ` Javier Arteaga
2018-05-02 13:55 ` Andy Shevchenko
2018-04-26 7:34 ` Lee Jones
2018-04-26 13:03 ` Javier Arteaga
2018-04-27 7:38 ` Lee Jones
2018-04-21 8:50 ` [RFC PATCH RESEND 3/3] pinctrl: upboard: Add UP2 pinctrl and gpio driver Javier Arteaga
2018-04-25 16:49 ` Andy Shevchenko
2018-04-26 2:38 ` Javier Arteaga
2018-04-26 6:50 ` Lee Jones
2018-04-26 13:36 ` Javier Arteaga
2018-04-25 9:53 ` [RFC PATCH RESEND 0/3] UP Squared board drivers Mika Westerberg
2018-10-19 17:15 ` [PATCH v2 " Dan O'Donovan
2018-10-19 17:15 ` [PATCH v2 1/3] mfd: upboard: Add UP2 platform controller driver Dan O'Donovan
2018-10-20 11:49 ` Andy Shevchenko
2018-10-25 11:05 ` Lee Jones
2018-10-25 13:15 ` Andy Shevchenko
2018-10-31 20:40 ` Dan O'Donovan [this message]
2018-10-19 17:15 ` [PATCH v2 2/3] leds: upboard: Add LED support Dan O'Donovan
2018-10-20 11:17 ` Andy Shevchenko
2018-10-21 8:31 ` Pavel Machek
2018-10-23 18:50 ` Jacek Anaszewski
2018-10-23 18:54 ` Pavel Machek
2018-10-23 19:09 ` Jacek Anaszewski
2018-10-23 19:30 ` Pavel Machek
2018-10-24 20:07 ` Jacek Anaszewski
2018-10-25 9:22 ` Andy Shevchenko
2018-10-25 17:44 ` Jacek Anaszewski
2018-10-23 19:23 ` Joe Perches
2018-10-23 20:31 ` Jacek Anaszewski
2018-10-24 10:13 ` Andy Shevchenko
2018-10-24 10:24 ` Joe Perches
2018-10-19 17:15 ` [PATCH v2 3/3] pinctrl: upboard: Add UP2 pinctrl and gpio driver Dan O'Donovan
2018-10-20 11:40 ` Andy Shevchenko
2018-10-31 19:55 ` Dan O'Donovan
2018-10-22 9:07 ` Linus Walleij
2018-10-24 13:05 ` [PATCH v2 0/3] UP Squared board drivers Andy Shevchenko
2018-10-31 20:44 ` [PATCH v3 " Dan O'Donovan
2018-10-31 20:44 ` [PATCH v3 1/3] mfd: upboard: Add UP2 platform controller driver Dan O'Donovan
2018-11-01 8:07 ` Lee Jones
2018-11-01 9:58 ` Dan O'Donovan
2018-11-11 11:29 ` Pavel Machek
2018-11-15 14:56 ` Linus Walleij
2018-10-31 20:44 ` [PATCH v3 2/3] leds: upboard: Add LED support Dan O'Donovan
2018-10-31 20:44 ` [PATCH v3 3/3] pinctrl: upboard: Add UP2 pinctrl and gpio driver Dan O'Donovan
2018-10-31 21:30 ` Linus Walleij
2018-10-31 21:39 ` Dan O'Donovan
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=cdf91d51-dfb5-b2dc-99af-60954cf32255@emutex.com \
--to=dan.odonovan@emutex.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=carlos.iglesias@emutex.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=jacek.anaszewski@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=pavel@ucw.cz \
/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
all inboxes | Powered by JetHome®