linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: "larry.lai" <larry.lai@yunjingtech.com>,
	lee@kernel.org, andriy.shevchenko@linux.intel.com,
	linus.walleij@linaro.org, pavel@ucw.cz
Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-leds@vger.kernel.org, GaryWang@aaeon.com.tw,
	musa.lin@yunjingtech.com, jack.chang@yunjingtech.com,
	noah.hung@yunjingtech.com
Subject: Re: [PATCH V8 1/3] mfd: Add support for UP board CPLD/FPGA
Date: Thu, 28 Dec 2023 16:31:08 +0100	[thread overview]
Message-ID: <c684f26c-029f-4264-9cd8-d3a2bb330ad2@kernel.org> (raw)
In-Reply-To: <20231228151544.14408-2-larry.lai@yunjingtech.com>

On 28/12/2023 16:15, larry.lai wrote:
> The UP Squared board <http://www.upboard.com> implements certain
> features (pin control, onboard LEDs or CEC) through an on-board CPLD/FPGA.
> 
> This driver implements the line protocol to read and write registers
> from the FPGA through regmap. The register address map is also included.
> 

...

> +#define FIRMWARE_ID_BUILD_OFFSET	12
> +#define FIRMWARE_ID_MAJOR_OFFSET	8
> +#define FIRMWARE_ID_MINOR_OFFSET	4
> +#define FIRMWARE_ID_PATCH_OFFSET	0
> +#define FIRMWARE_ID_MASK		GENMASK(3, 0)
> +
> +/*
> + * read CPLD register on custom protocol
> + * send clock and addr bit in strobe and datain pins then read from dataout pin
> + */
> +static int upboard_cpld_read(void *context, unsigned int reg, unsigned int *val)
> +{
> +	struct upboard_fpga * const fpga = context;

This const does not make sense. Drop it. Unless you wanted to say
something else, like struct is not modified, but then please read C
tutorials. This applies to all your three patches.

Best regards,
Krzysztof


  parent reply	other threads:[~2023-12-28 15:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28 15:15 [PATCH V8 0/3] Add support control UP board CPLD/FPGA pin control larry.lai
2023-12-28 15:15 ` [PATCH V8 1/3] mfd: Add support for UP board CPLD/FPGA larry.lai
2023-12-28 15:27   ` Krzysztof Kozlowski
2023-12-28 15:31   ` Krzysztof Kozlowski [this message]
2023-12-29  9:18     ` Jack Chang
2023-12-28 15:15 ` [PATCH V8 2/3] pinctrl: Add support pin control " larry.lai
2023-12-28 15:28   ` Krzysztof Kozlowski
2023-12-29  9:18     ` Jack Chang
2023-12-30 14:09       ` Krzysztof Kozlowski
2023-12-29  8:52   ` kernel test robot
2023-12-29  8:52   ` kernel test robot
2023-12-29 11:56   ` kernel test robot
2023-12-28 15:15 ` [PATCH V8 3/3] leds: Add support for UP board CPLD onboard LEDS larry.lai
2023-12-28 15:29   ` Krzysztof Kozlowski
2023-12-29  9:18     ` Jack Chang
2023-12-28 15:25 ` [PATCH V8 0/3] Add support control UP board CPLD/FPGA pin control Krzysztof Kozlowski

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=c684f26c-029f-4264-9cd8-d3a2bb330ad2@kernel.org \
    --to=krzk@kernel.org \
    --cc=GaryWang@aaeon.com.tw \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jack.chang@yunjingtech.com \
    --cc=larry.lai@yunjingtech.com \
    --cc=lee@kernel.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=musa.lin@yunjingtech.com \
    --cc=noah.hung@yunjingtech.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;
as well as URLs for NNTP newsgroup(s).