Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2447916ybc; Wed, 13 Nov 2019 14:40:41 -0800 (PST) X-Google-Smtp-Source: APXvYqzGA7H9OpFAJQqG9xgxdgJzbYbrWunyaY22p2oT7np7wgD87GT8slU7kMYWuBuiVqQjGFCo X-Received: by 2002:a17:906:8591:: with SMTP id v17mr5326790ejx.185.1573684841450; Wed, 13 Nov 2019 14:40:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573684841; cv=none; d=google.com; s=arc-20160816; b=01IjfvUiPkruej3XOGY/S1jZujzqq4n/zKUVj108itFu0GBxmNcnqRInuIMrKsw+da qqKDWkd4D28twz8BNgn9pSErjNqGH3UjQAQFV2FrijcqnX3YaAALZqpehrC07dK53/My VHMqfhymOgn4TAJuh8pC9ASooV3lHp6lGAnFe094LZO23+UHhg6Kqs/9Cu9gLqm6Ec2K ctG3yeVVf8rQZ1bW1tLbP6ejVhAoQkKbz9GtqmkMQbbXRP0l9hSa6LAexdsqckciccxB NoZkD7uZdgqd6Yqrx4kX2v+yc2BvALe78rks6t5G6BxQzP9ydCHMYhPZTvJDx6RpIajo wVLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=w7B875XZuR5oafFG8NOnl5OI5GsCZ+1ssBbHKFrJSNA=; b=RNYX9MO6GfCX4FJOVRm0Jg8FSAhRWQhyof7BCm5Xqeq7qvyg6ewC0UE6oFrDQhGQE2 k95jeB8z2fOBujauXyVZ+j90+MdsYEUIwgUhcxqw7vTNoJigWXjgZ7PlM66EXXEVoQqX bKe+B69cL7vizV5LrdUnCwMuzxMJGmsbfjXcVws5vfleEjBGIuXB+K8r6/hLjDIVNW7i CM8vaCs6Ieu9HoG/vaBv0iSPPSY669rxiaZrfL2YT7zE0st02eQ+Q0CJGRh0lyhznU3E ed6S5uUSc21GgYi/8WSjWgQlJupKqrsBQT5jafC/bz+NKabMWRm+MuasjfXZdoSfaUhv Vkgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="d/m02ana"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id np1si2085071ejb.370.2019.11.13.14.40.16; Wed, 13 Nov 2019 14:40:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="d/m02ana"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726452AbfKMWhS (ORCPT + 99 others); Wed, 13 Nov 2019 17:37:18 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38820 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726303AbfKMWhS (ORCPT ); Wed, 13 Nov 2019 17:37:18 -0500 Received: by mail-pf1-f194.google.com with SMTP id c13so2645254pfp.5; Wed, 13 Nov 2019 14:37:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=w7B875XZuR5oafFG8NOnl5OI5GsCZ+1ssBbHKFrJSNA=; b=d/m02anasZDot/whtRvfnFm0gsNWyld10J7fYzOfI64BcxOfVfBgn7fcJJBYdjkIVk zQlcyqV5L7dHO3dOAVKQ24V9iokEnJKRO5LPumfEVbvDwAMuKjaMARfOjx+jxu44Ur1r rzQ0989x7JNwDpaPJhD5304VJkPwRWK8mSYcx54a2RGtFX3I8kzl9BQS6KSWAjfu6iXb gBSx1T/MVs5PSphidTpet1T/qqxfLsO7UehqjenlSfqKQnDC9fjj/twChfMVS6uF57Ij VE0KvK08LhGziEVTBFLiY5jbB9OrWrps6xcICiApRCv3HXvYRHpo9cWMpRpZL0zCqsOH dOoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=w7B875XZuR5oafFG8NOnl5OI5GsCZ+1ssBbHKFrJSNA=; b=a4MPTWadBjK+vt0VZPoLj0Cj4RHJv9RmlaVh+kLQ23C4BGCfbgY+pNh0HH71e9hZs3 Si9ng3OFA+nytkZgzdXwESSZlii/DbXrr0Ll4urfJWMEatNwo28Jgpdx2nqmOOof3c1M 7CxJwIZDqPhOhoMCG57ME0Qa0c7hsE9Q/c0GGC/5NnfGgbiWehj0Y9R8/nkRkVGAaZpZ zU6W98HtWskmCHwpy5w0H3IZ1VfBAuBpJSTv0HCgy2ZDzcwod++4Yp/Rz7AmjyXExGZ/ 0M13bdvrnj5cdir1EQ/89UT+7inDeVnxGfhLwRip8Rvt38S9LWTE7Rzb9Z/Amz3VKboH QsrQ== X-Gm-Message-State: APjAAAWBzJJmB+Ywguq+f+/+Nzng8MjPpfS7y0VkFvg3PV6kGV6smPXN cxxyRqLdFFWneZlvXvrQZEM= X-Received: by 2002:a63:e407:: with SMTP id a7mr6238050pgi.92.1573684635287; Wed, 13 Nov 2019 14:37:15 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id 10sm3383259pgs.11.2019.11.13.14.37.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Nov 2019 14:37:14 -0800 (PST) Date: Wed, 13 Nov 2019 14:37:12 -0800 From: Guenter Roeck To: "Hennerich, Michael" Cc: Jonathan Cameron , "Bia, Beniamin" , "jic23@kernel.org" , "lars@metafoo.de" , "pmeerw@pmeerw.net" , "gregkh@linuxfoundation.org" , "linux-iio@vger.kernel.org" , "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" , "mark.rutland@arm.com" , "robh+dt@kernel.org" , "devicetree@vger.kernel.org" , "paulmck@linux.ibm.com" , "mchehab+samsung@kernel.org" , "linus.walleij@linaro.org" , "nicolas.ferre@microchip.com" , "biabeniamin@outlook.com" , Jean Delvare Subject: Re: [PATCH 1/3] iio: Add ADM1177 Hot Swap Controller and Digital Power Monitor driver Message-ID: <20191113223712.GA25398@roeck-us.net> References: <20191112153552.27431-1-beniamin.bia@analog.com> <20191112173757.0000075b@huawei.com> <20191112181734.GA30127@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 13, 2019 at 08:10:50AM +0000, Hennerich, Michael wrote: > > > > -----Original Message----- > > From: Guenter Roeck On Behalf Of Guenter Roeck > > Sent: Dienstag, 12. November 2019 20:18 > > To: Jonathan Cameron > > Cc: Bia, Beniamin ; jic23@kernel.org; > > lars@metafoo.de; Hennerich, Michael ; > > pmeerw@pmeerw.net; gregkh@linuxfoundation.org; linux- > > iio@vger.kernel.org; devel@driverdev.osuosl.org; linux- > > kernel@vger.kernel.org; mark.rutland@arm.com; robh+dt@kernel.org; > > devicetree@vger.kernel.org; paulmck@linux.ibm.com; > > mchehab+samsung@kernel.org; linus.walleij@linaro.org; > > nicolas.ferre@microchip.com; biabeniamin@outlook.com; Jean Delvare > > > > Subject: Re: [PATCH 1/3] iio: Add ADM1177 Hot Swap Controller and Digital > > Power Monitor driver > > > > On Tue, Nov 12, 2019 at 05:37:57PM +0000, Jonathan Cameron wrote: > > > On Tue, 12 Nov 2019 17:35:50 +0200 > > > Beniamin Bia wrote: > > > > > > > From: Michael Hennerich > > > > > > > > ADM1177 is a Hot Swap Controller and Digital Power Monitor with Soft > > > > Start Pin. > > > > > > > > Datasheet: > > > > Link: > > > > https://www.analog.com/media/en/technical-documentation/data- > > sheets/ > > > > ADM1177.pdf > > > > > > > > Signed-off-by: Michael Hennerich > > > > Co-developed-by: Beniamin Bia > > > > Signed-off-by: Beniamin Bia > > > > > > Hi Beniamin, > > > > > > A couple immediate thoughts. > > > > > > 1. That cc list has some rather non obvious people on it. Unless something > > > fairly surprising is going on, probably better to cut it back a bit. > > > > > > 2. Why IIO? Not entirely obvious to me. From first glance this is definitely > > > doing hardware monitoring. If there is a reason there should be a clear > > > statement here on why. > > > > > > > I don't see why this is implemented as iio driver. I think it should be > > implemented as hardware monitoring driver. > > Totally agree that this driver could have been implemented as HWMON driver. > Well we use this device as USB supply monitor on our embedded portably kits, to detect low VBUS or excess current draw. > > ADALM-PLUTO and ADALM2000: > https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/adalm-pluto.html > > https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/ADALM2000.html > > The only connectivity to the host PC is via IIO/libiio USB Gadget FS and Ethernet backends. > > We recommend people to read the IIO attributes whenever they report an issue. > Unless libiio supports directly HWMON or HWMON adds an IIO bridge we would prefer this driver being exposed as IIO device, since HWMON users still can use the IIO/HWMON bridge. > I do not think this is a valid argument. - This is a hardware monitoring chip. - Implementing kernel support as IIO driver, keeping it out of tree for years, establishing an iio based use case, and then pressuring kernel maintainers to accept an iio driver seems inappropriate. - The argument of "we need libiio support for this chip" could effectively be used to re-implement pretty much all hwmon drivers as iio drivers. - The iio->hwmon bridge would add complexity for the majority of potential users of this chip. Focus should be on the majority, not on one use case. - Userspace may as well use libsensors and/or sensors to do the necessary access - or implement it if neded. Or add a libsensors based backend to libiio (or to iiod). - Last but not least, it would be more appropriate to implement a generic hwmon->iio bridge for iio use cases for chips supported by hwmon drivers, similar to the hwmon->thermal bridge. Guenter