From patchwork Sat Oct 5 16:28:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 13823376 X-Patchwork-Delegate: kuba@kernel.org Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3321D14A4F7; Sat, 5 Oct 2024 16:28:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728145727; cv=none; b=J7+0lBq8i1gGhS6nltdyXvgGD25Mq6PFbLAY2Fbg5+G6GaL/0f920e6UT8h7KqrhL6hrOhMOioDkfRJwdDw5IKvupAAlzljqQIg7I4Nv96ZwH1jFBRvKRZVZ4/zigfBFu2W5Lna3aor9JfQ/JmwHBci5GgJJBwpEDBosViEAA6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728145727; c=relaxed/simple; bh=/1zA0mp9VAeBlM8oa9n+jmxw+nSew2/1tOt5CK4IRHM=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DcZTDy1ScAlyGH3EFKEjDIlb+idZrSjTWdxVw2Gxf2CuZ5ABJ5ofMHIcZJ81UXYfIrO5DdLAmgl6nqmOmZ23K4BzwvDGoQVl2OMgIqeXxjMQD2xr6BecTJkTFDm9hqow3JeHBcU6dut15dzpA0DW4b5UoWZkImuKi/hdBtjmrj4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.98) (envelope-from ) id 1sx7e4-0000000046L-3MCW; Sat, 05 Oct 2024 16:28:40 +0000 Date: Sat, 5 Oct 2024 17:28:37 +0100 From: Daniel Golle To: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Xu Liang , Christian Marangi , Bartosz Golaszewski , Daniel Golle , Robert Marko , Russell King , Abhishek Chauhan , Jacek Anaszewski , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH net-next 4/4] net: phy: mxl-gpy: correctly describe LED polarity Message-ID: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Patchwork-Delegate: kuba@kernel.org According the datasheet covering the LED (0x1b) register: 0B Active High LEDx pin driven high when activated 1B Active Low LEDx pin driven low when activated Make use of the now available 'active-high' property and correctly reflect the polarity setting which was previously inverted. Signed-off-by: Daniel Golle --- drivers/net/phy/mxl-gpy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c index 1c9cd00c7bee..f50697f35160 100644 --- a/drivers/net/phy/mxl-gpy.c +++ b/drivers/net/phy/mxl-gpy.c @@ -1013,13 +1013,15 @@ static int gpy_led_polarity_set(struct phy_device *phydev, int index, case PHY_LED_ACTIVE_LOW: active_low = true; break; + case PHY_LED_ACTIVE_HIGH: + break; default: return -EINVAL; } } return phy_modify(phydev, PHY_LED, PHY_LED_POLARITY(index), - active_low ? 0 : PHY_LED_POLARITY(index)); + active_low ? PHY_LED_POLARITY(index) : 0); } static struct phy_driver gpy_drivers[] = {