public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Jammy Huang <jammy_huang@aspeedtech.com>,
	eajames@linux.ibm.com, mchehab@kernel.org, joel@jms.id.au,
	andrew@aj.id.au, pmenzel@molgen.mpg.de
Cc: linux-media@vger.kernel.org, openbmc@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org,
	linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] media: aspeed: Allow to capture from SoC display (GFX)
Date: Wed, 14 Aug 2024 08:09:06 +0200	[thread overview]
Message-ID: <003090ab-4ce2-4624-b5c5-33ceef521e9d@kernel.org> (raw)
In-Reply-To: <20240814005421.3362441-3-jammy_huang@aspeedtech.com>

On 14/08/2024 02:54, Jammy Huang wrote:
> +/*
> + * Get regmap without checking res, such as clk/reset, that could lead to
> + * conflict.
> + */
> +static struct regmap *aspeed_regmap_lookup(struct device_node *np, const char *property)
> +{
> +	struct device_node *syscon_np __free(device_node) = of_parse_phandle(np, property, 0);
> +	struct regmap *regmap;

Drop. The point of using __free was to make this very simple.

> +
> +	if (!syscon_np)
> +		return ERR_PTR(-ENODEV);
> +
> +	regmap = device_node_to_regmap(syscon_np);
> +
> +	return regmap;
> +}
> +
>  static int aspeed_video_init(struct aspeed_video *video)
>  {
>  	int irq;
>  	int rc;
>  	struct device *dev = video->dev;
>  
> +	video->scu = aspeed_regmap_lookup(dev->of_node, "aspeed,scu");
> +	video->gfx = aspeed_regmap_lookup(dev->of_node, "aspeed,gfx");

Still undocumented. Respond to previous comment and confirm that you
understood it.


Best regards,
Krzysztof


  reply	other threads:[~2024-08-14  6:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-14  0:54 [PATCH v4 0/2] media: aspeed: Allow to capture from SoC display (GFX) Jammy Huang
2024-08-14  0:54 ` [PATCH v4 1/2] ARM: dts: aspeed: Add properties of scu and gfx for video Jammy Huang
2024-08-14  6:07   ` Krzysztof Kozlowski
2024-08-14  0:54 ` [PATCH v4 2/2] media: aspeed: Allow to capture from SoC display (GFX) Jammy Huang
2024-08-14  6:09   ` Krzysztof Kozlowski [this message]
2024-08-16  2:31     ` Jammy Huang

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=003090ab-4ce2-4624-b5c5-33ceef521e9d@kernel.org \
    --to=krzk@kernel.org \
    --cc=andrew@aj.id.au \
    --cc=eajames@linux.ibm.com \
    --cc=jammy_huang@aspeedtech.com \
    --cc=joel@jms.id.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=pmenzel@molgen.mpg.de \
    /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