Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp48372lqt; Wed, 5 Jun 2024 16:55:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVrHT9z6HB+LLdAjvURqFUgQz0WnuE0hK8kzOzR5qK00sACYi8xxS0YCJMwlQDdZ+L8vG6MiZ64Sl6n/UYNY3eYZyf6TXHBDPEdvRwYMg== X-Google-Smtp-Source: AGHT+IFRapAonBeXeLDwf0oMCATLjvaLNszdB/bmKtTNZIfCVp6qcGEx6tEU50xpSpZoTUeOZNwn X-Received: by 2002:a17:902:d512:b0:1f6:1c5f:e089 with SMTP id d9443c01a7336-1f6a5a86e72mr51127805ad.60.1717631709094; Wed, 05 Jun 2024 16:55:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717631709; cv=pass; d=google.com; s=arc-20160816; b=bB1BuYuNN2K3j8/KFNQp6Bx3eq47tD5N1Iw1THhayf0QlQG5DuAXF3nfTm/dS1eItx 8rpY07VnW3cuqvGHJfNSkfh9QN6CfBLL4tRFkdvsnh38BKtxo8LcSZC1I6Bfa9VF0wqt Wo1pQultU+OupoBWDNXI3LS9vG/cDgC4+nbqS9d1QxV+rRQEEKvY39zkNhjiWwL6NaVy b/oceL7VU6M7p2rza0e1L1ndx6EoCTKROCm/JDO2e8ZTkO7GeimsgT5Tr7TtjNF4saKQ oF1OEJw55Y9V74kRC7vbrM0KZIgVCNORlq6UNoiEBhZrXj3AuUUXHfa/BEP0hAis1JQx 8tfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rr+szjuFR3gV3Qhkbhm6H67xU6ekFnR94EYntHPuyxg=; fh=WdSRzk922N/BgTHvlunb91BWTLjUl7UAizS7+bkvW5o=; b=pfVCkrYiYNWw+wL5p+HvBAZ4AMvRnmNfyOzSRXGX+dTUJohIKImg9sSpskplfy7TIn 0b1DZg4ay84RnZYpWFG86fgIpkF1y5Jfxrj/ecSgzNOuahtxSCyuqSHiq4NDzhGJiq0C NsomXWCHljM7mvMVF1oNgx2qq/8v2QezXdYjnBNSCS1CZLX4KkNQtBZdTVg2QTUtw/gj PRK2PJqiUqlAxMKf9OKaCx5ftw7GUJ6M6NaIAbeSUApDVrDO6jpUeAC07dYBfwqHJFyJ QIJr+DhyB195HR88eW9pYohLnXMbHsNnlyPczZqNras5sBEujVORUaZG4MudIQHGbWfL qzjA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KNBfEpor; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-203433-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f6bd76f6dcsi1660275ad.158.2024.06.05.16.55.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 16:55:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203433-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KNBfEpor; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-203433-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0CCF7284CB3 for ; Wed, 5 Jun 2024 23:55:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1B4D17E905; Wed, 5 Jun 2024 23:52:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="KNBfEpor" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 497DB1AAA5; Wed, 5 Jun 2024 23:52:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717631555; cv=none; b=o1W1JZxblfH0QcQVuq5bs8r7L32FbWjFADJgNiH1/OLQEpe7rVIK1VsUmLwENv+6ZsLzsHbIq7r1gRxyxAtO+NSa+PF4IKHnG/uxtDa09f0tanTF1klONeHiJEK/erWLHU6t5i88iSYOLJQ7ogMurv22J+WbtP/NfY2CdDhOIfE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717631555; c=relaxed/simple; bh=S5f1uzmtb8uc01jTh5ar2w9G5sPTtr6TfMY0Y57y51I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=exwogDsvrL/SjVBeonkMvJOIAhXt+5/ce3ZCODcd42EmUAkFYXmQu7/MNW6GqVij8qS/KMM9ZB2uSP5mF42RSxQLVrRg7Zd3lED+IBn279rTvu5ygGatzeMbfuHAXJBOqgeB+EJQil8i2r1uHdGwf2/Lx1CIzt2dPsZ2fSyXPUo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=KNBfEpor; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1717631552; bh=S5f1uzmtb8uc01jTh5ar2w9G5sPTtr6TfMY0Y57y51I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KNBfEporJmpNknMJZiS7jXmOSq3w0jhWnijSn4zrZwzqTv3/Kj5GVr6rc6RPSfiiT xT9DFOCYJQsU6Tr/r+mnHtF2sGq9z3d46OV6sWbul/Nk450x6Nk91ddyF1hbDkLe5c h8ukxce5hZ0e1geY0NehPHakiJdHx9l8TbIuO3FZGdq/57JX8HhLSmx4Ms8dodvsL7 dvDMEhasmnTC+AwDr0wdJaRTpaSJrmOl2InBZelFa2Ofy7K5QOUwrHYHtRkyU0gTkP 3eC9k0VkNpiAUIOQm9hnA3MWtJu3DaWtXfGajefxKRz3zfwHhjWXnzCBzOp7xh1MMx AC523n1BdeTlA== Received: from mercury (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sre) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 3346937820CD; Wed, 5 Jun 2024 23:52:32 +0000 (UTC) Received: by mercury (Postfix, from userid 1000) id ACD2B1060501; Thu, 06 Jun 2024 01:52:31 +0200 (CEST) Date: Thu, 6 Jun 2024 01:52:31 +0200 From: Sebastian Reichel To: Dmitry Baryshkov Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Hans de Goede , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Bryan O'Donoghue , Heikki Krogerus , Greg Kroah-Hartman , Konrad Dybcio , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, Nikita Travkin Subject: Re: [PATCH v4 4/6] power: supply: lenovo_yoga_c630_battery: add Lenovo C630 driver Message-ID: References: <20240528-yoga-ec-driver-v4-0-4fa8dfaae7b6@linaro.org> <20240528-yoga-ec-driver-v4-4-4fa8dfaae7b6@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ebyt27yflv6nt4ze" Content-Disposition: inline In-Reply-To: <20240528-yoga-ec-driver-v4-4-4fa8dfaae7b6@linaro.org> --ebyt27yflv6nt4ze Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Thanks for your patch. I have a few more comments. On Tue, May 28, 2024 at 11:44:49PM +0300, Dmitry Baryshkov wrote: ... > +struct yoga_c630_psy { > + struct yoga_c630_ec *ec; > + struct device *dev; > + struct device_node *of_node; Please use fwnode > +static enum power_supply_property yoga_c630_psy_bat_mA_properties[] = { > + POWER_SUPPLY_PROP_STATUS, > + POWER_SUPPLY_PROP_PRESENT, > + POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, > + POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, > + POWER_SUPPLY_PROP_CHARGE_FULL, > + POWER_SUPPLY_PROP_CHARGE_NOW, > + POWER_SUPPLY_PROP_CURRENT_NOW, > + POWER_SUPPLY_PROP_POWER_NOW, > + POWER_SUPPLY_PROP_VOLTAGE_NOW, > + POWER_SUPPLY_PROP_TECHNOLOGY, > + POWER_SUPPLY_PROP_MODEL_NAME, > + POWER_SUPPLY_PROP_MANUFACTURER, > +}; > + > +static enum power_supply_property yoga_c630_psy_bat_mWh_properties[] = { > + POWER_SUPPLY_PROP_STATUS, > + POWER_SUPPLY_PROP_PRESENT, > + POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, > + POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN, > + POWER_SUPPLY_PROP_ENERGY_FULL, > + POWER_SUPPLY_PROP_ENERGY_NOW, > + POWER_SUPPLY_PROP_CURRENT_NOW, > + POWER_SUPPLY_PROP_POWER_NOW, > + POWER_SUPPLY_PROP_VOLTAGE_NOW, > + POWER_SUPPLY_PROP_TECHNOLOGY, > + POWER_SUPPLY_PROP_MODEL_NAME, > + POWER_SUPPLY_PROP_MANUFACTURER, > +}; Please also add POWER_SUPPLY_PROP_SCOPE = POWER_SUPPLY_SCOPE_SYSTEM > +static enum power_supply_property yoga_c630_psy_adpt_properties[] = { > + POWER_SUPPLY_PROP_ONLINE, > +}; Please also add POWER_SUPPLY_PROP_USB_TYPE = POWER_SUPPLY_USB_TYPE_C > +static const struct power_supply_desc yoga_c630_psy_adpt_psy_desc = { > + .name = "yoga-c630-adapter", > + .type = POWER_SUPPLY_TYPE_USB_TYPE_C, static const enum power_supply_usb_type yoga_c630_psy_adpt_usb_type[] = { POWER_SUPPLY_USB_TYPE_C, }; .type = POWER_SUPPLY_TYPE_USB .usb_types = yoga_c630_psy_adpt_usb_type .num_usb_types = ARRAY_SIZE(yoga_c630_psy_adpt_usb_type), > + .properties = yoga_c630_psy_adpt_properties, > + .num_properties = ARRAY_SIZE(yoga_c630_psy_adpt_properties), > + .get_property = yoga_c630_psy_adpt_get_property, > +}; > + Greetings, -- Sebastian --ebyt27yflv6nt4ze Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmZg+jwACgkQ2O7X88g7 +prgcg/+Oj9Lis1zOv00R9LtK2n3mOqqE4WLDAnm9j8cxMhyQyNlAOY/71t6VkCU bXeDpkoBVYVLRTHu++yw7yuBXckKJ8ZGxfzGtuHPiUzl2FjXBOjZEHCc7RlAfiHy wLpqos2ZHrDu/IkSr1wgLmPe1nqOGbuBWJLcUgmi0pk9iKt5+tB1w2UqP7CsqDRH ncOE7YydWI71ueD4DmBceAa4p11mUnX+dBrx2vuTWUPaAJecpP6vcIkqWiKdf5LF USw8GvSMfEgBus/KMgohMI9YJvNeNM/iC8wjxjOFHN6Csvt5VmRE7L7rk/EsG1QX g+zXiHh8FxasapjsiM5ZHwYbT5zZBLSl6DLS16gcouZu7a8spmPXDi4PafaHi46A YGNjb1It/aUdJdA2GLjiHXZKCtmTNKTngm40UbP0BsfSJgG7tGTfQb7HNCShBOlL V1KmhEeIuFgs0PbkAH5bu993Vu2qn19ohYwd64KWTJqXtsMlfDWxcOPw8aNBxDc1 i8kv1Tytya3a0XK3oCHUZ4AUVO2BfwbA0uLc2JVZ0LV2nJiCeFVzyW76YA4FhAPl PeIvwvoOYAD4GtX6Ovf4npq5QMhMjG1f5QBVW1CkjXPtYeZNqAIft8AlnL0MzazY 4rKlgjL6XywuGsqmhSEO43GoBleMTQNDwi3J+LOM/u4Fmi3f1zE= =PNUy -----END PGP SIGNATURE----- --ebyt27yflv6nt4ze--