From: Yegor Yefremov <yegorslists@googlemail.com>
To: Sascha Hauer <sha@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2] net: phy: add driver for MotorComm PHY
Date: Thu, 8 Jun 2023 12:48:47 +0200 [thread overview]
Message-ID: <CAGm1_ku-9qaGMZsEO0ME90rd3dnf5Q12XwjfUpYeXwciNmYvnw@mail.gmail.com> (raw)
In-Reply-To: <20230606095851.GD18491@pengutronix.de>
Hi Sascha,
On Tue, Jun 6, 2023 at 11:58 AM Sascha Hauer <sha@pengutronix.de> wrote:
>
> Hi Yegor,
>
> On Tue, Jun 06, 2023 at 10:21:39AM +0200, Yegor Yefremov wrote:
> > Hi Sascha,
> >
> >
> > > + ret = phy_modify(phydev, YT8511_PAGE, YT8511_DELAY_FE_TX_EN, fe);
> > > + if (ret < 0)
> > > + goto err_restore_page;
> > > +
> > > + /* leave pll enabled in sleep */
> > > + ret = phy_write(phydev, YT8511_PAGE_SELECT, YT8511_EXT_SLEEP_CTRL);
> > > + if (ret < 0)
> > > + goto err_restore_page;
> > > +
> > > + ret = phy_modify(phydev, YT8511_PAGE, 0, YT8511_PLLON_SLP);
> > > + if (ret < 0)
> > > + goto err_restore_page;
> > > +
> > > +err_restore_page:
> > > + return phy_restore_page(phydev, oldpage, ret);
> >
> > As for this approach, it is also used by some other drivers in the Linux kernel:
> >
> > drivers/net/phy/realtek.c
> > drivers/net/phy/icplus.c
>
> It's ok like this. I didn't realize phy_restore_page() takes ret as
> argument and returns it.
The driver doesn't use a phy_id_mask for now and it causes problems
that unknown PHY will be assigned to MotorComm. What mask should I
use? 0xfffffff or 0x00000fff?
Regards,
Yegor
next prev parent reply other threads:[~2023-06-08 10:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 8:17 yegorslists
2023-06-06 8:21 ` Yegor Yefremov
2023-06-06 9:58 ` Sascha Hauer
2023-06-08 10:48 ` Yegor Yefremov [this message]
2023-06-09 6:15 ` Sascha Hauer
2023-06-09 6:17 ` Sascha Hauer
2023-06-06 9:57 ` Sascha Hauer
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=CAGm1_ku-9qaGMZsEO0ME90rd3dnf5Q12XwjfUpYeXwciNmYvnw@mail.gmail.com \
--to=yegorslists@googlemail.com \
--cc=barebox@lists.infradead.org \
--cc=sha@pengutronix.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