Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp52322lqz; Fri, 29 Mar 2024 08:16:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUAUwBnwWWOmIST9i10c06vSjm+FwoK9nYHOk7Yn3dnGfSjsus2/1+VgiG26Bq15Foy67ASgv19ZTsJ+AtLIu0Hc55XeipCkJkgJdq0SA== X-Google-Smtp-Source: AGHT+IG0yuog055Io4wYdSl1pp1N0fKP9GlTVMfmH5AiXQjcLPfcbt2F6pCfGs3kxS0R0z6zMXD/ X-Received: by 2002:a17:906:a893:b0:a4e:3da4:d488 with SMTP id ha19-20020a170906a89300b00a4e3da4d488mr895107ejb.33.1711725409415; Fri, 29 Mar 2024 08:16:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711725409; cv=pass; d=google.com; s=arc-20160816; b=lpv9bfvUm0fD26+CZaXZT++6iQ6Yjb7yz31iOx1X6uUZBr3HSRzj6QQ18hw9yfxXLN ejbaAv84N+wJffb3h3mWuq6JBTYQOrx9Rjx1drVLoJ9hi3aOvhG8yI7uEXMUnRHVFKLr w46sVG0404+OuHkTNuHpFio4Q9Tpmstzk27360T1ShigbEaHafD4r+LUDZ00+qmqCySe +tr4zeZilTqhJhXlcxI51kGO287UjrIBWs5Usg82LaWtHs735/QUjHNZIU3zjl0AfyUt l+RUlicyjHwV5yIco9nwxmm9Q1TI155cSFFUcSZkDpfXfH/VfUdliiUKlGjgWn9eOJmN 7aBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=dCUwrIMp7HXs+dtloBRIzPq+G9ld6MDNTIcOpzNWDXw=; fh=0W7O8XCe2cL6t2pYyF6K2Uzc0fKhUjhG2fqwPbyET64=; b=a7B7ciC7qraHE2DG2Q5yJQeRT1E22Dg7f4j/YMHdQBklEFbkQDGR9biQqyzbiNlv6a zQ1l2wl00O/RQPkDWwrtiP2r4QxC/M1FKdswBqcXufWyisM5JJucJMQns1DLB4vRGeLv J5Meh7Hj1xBUPROOtSS8TYL/DTSksBvtYD+wlusdxSltAZ0Z6seBiJeQlzVp2F7LSLQ2 KBrTVU8Njj6d/IhZVNYslO3UHTpErSNLN4a2/Ea/moOSpSvG8AI2eZsQT5S6u6DPrLow wZY3x78OtMjgWaL0CdqiJnyPAxanJif0WxgeEN0LSdquTRaR2upDfquWm0wDZuvpLfJI Brng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SZDMwcWW; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-125099-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125099-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a6-20020a1709062b0600b00a4748ca721csi1845091ejg.439.2024.03.29.08.16.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 08:16:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125099-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SZDMwcWW; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-125099-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125099-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 29B751F320B7 for ; Fri, 29 Mar 2024 15:16:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F8E414AD1D; Fri, 29 Mar 2024 14:55:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="SZDMwcWW" Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (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 BA1BB4A0A; Fri, 29 Mar 2024 14:55:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711724143; cv=none; b=FY7cKhSTVoCq4q+JIoN+IKT/zwQ/S6uoh8yRNJvcErhoczBDyPwofxEDQhWrJ0V12vexihNk4bds5Irhk9W0SaayZSylWiMRYJqKIgkhqQOOCA0AaJyp7/Ze6Z95mhT/GHFfiUfHrytYOg0iLPPikPwgWQbc/o6at6WpkxQUjeA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711724143; c=relaxed/simple; bh=T8BNxaHXO7JTfIjDjaQZY7GeuN5pVFvIqxiQyV2J3EU=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CvAFwuExmf7jav6qB+eR5IoWNUzBgZk3hk7YYB87Q3py6UKNuwlptTjYZbnOFlxAoZkarUeqla4gMYI+E1LxZ/xoHrc9DNpDSNr0cmF1TO48ivgIBEH/zJpuc+rUCQlFydM77EwIG9InhaMkPMjLgV4q7zZYlKzZcB4RWVALnnc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=SZDMwcWW; arc=none smtp.client-ip=217.70.183.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id DFCA6FF803; Fri, 29 Mar 2024 14:55:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1711724138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dCUwrIMp7HXs+dtloBRIzPq+G9ld6MDNTIcOpzNWDXw=; b=SZDMwcWWM869fsD9v3HSQq/0fV1d+LhqjiqbOrsWZOA1YoAoSiCu2qJKPYKlxoKDoexdcX G/cUYuBa2qrZGSSEleeu/8a0NKN0fEyYdIgAjuoNyqPx3H9RsPSz4cd0uOqYHMbyF8IZ8F J6ZZzPfPrN1cp+nqphlUMEY0p1hi4G6wryNeuRzyKEq4kUgM3qLPbQ8E/rwEmU1oMG0HsN vZ8jFvCKrdlNvdJi7raaG5UwnFaME0vvJVe78tGKjwxzExvdXUFUC7dpl5lxrs7PlvUqRD w6PqUtpirxHV5cSf6GYWYO46lTtJFBx95IdhVwST321Jsbw2YZBz2LBEBGEjVg== Date: Fri, 29 Mar 2024 15:55:35 +0100 From: Kory Maincent To: Andrew Lunn Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Luis Chamberlain , Russ Weight , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Oleksij Rempel , Mark Brown , Frank Rowand , Heiner Kallweit , Russell King , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, Dent Project Subject: Re: [PATCH net-next v6 17/17] net: pse-pd: Add TI TPS23881 PSE controller driver Message-ID: <20240329155535.6228ba86@kmaincent-XPS-13-7390> In-Reply-To: <0cc9923f-2907-471e-81b0-2ca01a6e8c79@lunn.ch> References: <20240326-feature_poe-v6-0-c1011b6ea1cb@bootlin.com> <20240326-feature_poe-v6-17-c1011b6ea1cb@bootlin.com> <0cc9923f-2907-471e-81b0-2ca01a6e8c79@lunn.ch> Organization: bootlin X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: kory.maincent@bootlin.com On Thu, 28 Mar 2024 17:17:43 +0100 Andrew Lunn wrote: > > + > > + /* Set operating mode */ > > + ret =3D i2c_smbus_write_word_data(client, TPS23881_REG_OP_MODE, > > 0xaaaa); =20 >=20 > Could you add some #defines here? This is semiauto i think? Yes > > + /* Enable detection and classification */ > > + val =3D 0; > > + for (i =3D 0; i < TPS23881_MAX_CHANS; i++) { > > + if (!port_matrix[i].exist) > > + continue; > > + > > + val |=3D BIT(port_matrix[i].lgcl_chan[0]) | > > + BIT(port_matrix[i].lgcl_chan[0] + 4); > > + if (port_matrix[i].is_4p) > > + val |=3D BIT(port_matrix[i].lgcl_chan[1]) | > > + BIT(port_matrix[i].lgcl_chan[1] + 4); > > + } > > + ret =3D i2c_smbus_write_word_data(client, TPS23881_REG_DET_CLA_EN, > > 0xffff); =20 >=20 > This looks odd. You calculate val, and then don't use it? Oh indeed, you are right! Thanks for spotting the issue. Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com