netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Esben Haabendal <esben.haabendal@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Bhadram Varka <vbhadram@nvidia.com>,
	Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
	Florian Fainelli <f.fainelli@gmail.com>,
	open list <linux-kernel@vger.kernel.org>,
	"netdev\@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] net: phy: marvell: Enable interrupt function on LED2 pin
Date: Fri, 06 Apr 2018 19:10:58 +0200	[thread overview]
Message-ID: <871sfs1crh.fsf@gmail.com> (raw)
In-Reply-To: <20180405144355.GB32663@lunn.ch> (Andrew Lunn's message of "Thu, 5 Apr 2018 16:43:55 +0200")

Andrew Lunn <andrew@lunn.ch> writes:

>> diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index
>> 0e0978d8a0eb..f03a510f1247 100644
>> --- a/drivers/net/phy/marvell.c
>> +++ b/drivers/net/phy/marvell.c
>> @@ -457,6 +457,21 @@ static int marvell_of_reg_init(struct phy_device
>> *phydev) } #endif /* CONFIG_OF_MDIO */
>>  
>> +static int m88e1318_config_intr(struct phy_device *phydev) {
>> +	int err;
>> +
>> +	err = marvell_config_intr(phydev);
>> +	if (err)
>> +		return err;
>> +
>> +	/* Setup LED[2] as interrupt pin (active low) */
>> +	return phy_modify(phydev, MII_88E1318S_PHY_LED_TCR,
>> +			  MII_88E1318S_PHY_LED_TCR_FORCE_INT,
>> +			  MII_88E1318S_PHY_LED_TCR_INTn_ENABLE |
>> +			  MII_88E1318S_PHY_LED_TCR_INT_ACTIVE_LOW);
>> 
>> Can we move this part of the code to m88e1121_config_init() ?
>> 
>> Every time whether we disable or enable the interrupts this part of code
>> will execute.
>
> Yes, doing this once would be better. But please allow the LED pin to
> be used as an LED when not using interrupts. phy_interrupt_is_valid()
> should be involved somehow.

This should be addressed in v2 of the patch which I have already posted.

/Esben

  reply	other threads:[~2018-04-06 17:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-05 13:35 [PATCH] net: phy: marvell: Enable interrupt function on LED2 pin Esben Haabendal
2018-04-05 14:00 ` Bhadram Varka
2018-04-05 14:43   ` Andrew Lunn
2018-04-06 17:10     ` Esben Haabendal [this message]
2018-04-05 20:40 ` [PATCH v2] " Esben Haabendal
2018-04-06 17:29   ` Andrew Lunn
2018-04-06 17:37     ` David Miller
2018-04-10 13:49   ` Sasha Levin
2018-04-09  3:37 ` [PATCH] " Sasha Levin

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=871sfs1crh.fsf@gmail.com \
    --to=esben.haabendal@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=vbhadram@nvidia.com \
    /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).