ALT Linux kernel packages development
 help / color / mirror / Atom feed
From: Alexey Sheplyakov <asheplyakov@basealt.ru>
To: ALT Linux kernel packages development <devel-kernel@lists.altlinux.org>
Cc: rst@basealt.ru, sin@basealt.ru, nir@basealt.ru, manton@basealt.ru
Subject: Re: [d-kernel] [PATCH] [p10/std-def] phy: realtek: leds configuration for RTL8211f
Date: Fri, 14 Oct 2022 13:35:47 +0400
Message-ID: <Y0ktc89gHRASEKqr@asheplyakov-rocket> (raw)
In-Reply-To: <20221014020205.gnlayjl3xhsumwgg@altlinux.org>

Здравствуйте!

On Fri, Oct 14, 2022 at 05:02:05AM +0300, Vitaly Chikunov wrote:
> Обратил внимание на "Если мы хотим этот патч в std-def/un-def -
> требуется тщательное тестирование на регрессии на x86_64 системах."

Замечание касается изначальной версии патча: https://my.basealt.space/attachments/140630

Патч, который я прислал, ничего не меняет на x86{,_64}:

> Configure leds according to 'realtek,led-mode', 'realtek,led[0-2]-control'
> knobs (specified in DTB). Note that *all* of these parameters must be
> set in DTB for this to work.

На x86{,_64} нет device tree, параметрам неоткуда взяться, и никаких
изменений нет:

> +static void rtl8211f_config_led(struct phy_device *phydev)
> +{
> +	struct device *dev = &phydev->mdio.dev;
> +	struct device_node *of_node = dev->of_node;
> +	u16 val;
> +	u32 led_mode, led0_ctrl, led1_ctrl, led2_ctrl;
> +	int ret;
> +
> +	ret = of_property_read_u32(of_node, "realtek,led-mode", &led_mode);
> +	if (ret < 0) {
> +		dev_dbg(dev, "refusing to reconfigure leds: no 'realtek,led-mode' in dtb\n");
> +		return;
> +	}

dev->of_node == NULL, поэтому of_property_read_u32 вернёт ошибку, и
rtl8211f_config_led ничего не делает с устройством.

Более того, даже на системе с device tree нужно, чтобы в описании phy
присутствовали все 4 параметра "realtek,led-mode", "realtek,led0-control",
"realtek,led1-control", "realtek,led2-control".

Всего доброго,
	Алексей


  reply	other threads:[~2022-10-14  9:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13 14:33 Alexey Sheplyakov
2022-10-14  2:02 ` Vitaly Chikunov
2022-10-14  9:35   ` Alexey Sheplyakov [this message]
2022-10-14  9:37     ` Vitaly Chikunov

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=Y0ktc89gHRASEKqr@asheplyakov-rocket \
    --to=asheplyakov@basealt.ru \
    --cc=devel-kernel@lists.altlinux.org \
    --cc=manton@basealt.ru \
    --cc=nir@basealt.ru \
    --cc=rst@basealt.ru \
    --cc=sin@basealt.ru \
    /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

ALT Linux kernel packages development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
		devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
	public-inbox-index devel-kernel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git