Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp632683rwb; Fri, 23 Sep 2022 01:52:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM74FsXapXmtNa9WZyUU8Ou8xbZ7A1N/DK1BbM/wyfNjE5n4ewXbp3RkNOwVpTxeQAmgU23P X-Received: by 2002:a17:907:6d23:b0:782:c9fe:19fa with SMTP id sa35-20020a1709076d2300b00782c9fe19famr58119ejc.707.1663923134715; Fri, 23 Sep 2022 01:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663923134; cv=none; d=google.com; s=arc-20160816; b=C3g+QX/Im4CPrZqiG9S3q29qBLVw0JGGHSkbZQ9IXiYr2u38BehHH6h59HOo+X48Jw Y4X+p/uyXH+n6cVwGN/Kl26z9BdEW/On5dKjbYG2+e/osEInYx0w9KLYSc686Lr+iwuj ccRSLu9zjesiLN5yzW0Zm6c7eWvhmZdCVyUTlbf309OQ6DxbRYdg4L6pg+xS0gK1+vli +kWvt6xJ6TVP1M8ADMvcb5rl4fOez6CHbgSKMnoJ2bUxf/5dX9Fg3OpM/Ubz1oOCsX4m cGvXGRdCc107n88POCb1gI93Q4hzjqOKszz31A7OO+Xmo8SqXNVnBHykAvCgMw94LMqh +FuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=U6zfmLFphAIrgL4F8F09QdcSH0hrlIdwizKDu5PkikA=; b=SnF0ba8vWtCLI5as8/Q489InY5ZkLkitRXSJ3fAGxFi3LsEE9J//c1K2fZ/41E3pOD 0I4gjLXbsI8rbogRh5SO7deHUTi12gih3/srEBTGjfCE7wnZ6rPsSoTsK02w6Rn5zS9Y 0uAwxNIghXLledwusjtBjfRn1B/iCM/CXYPB2zZ9zWw9ETGprtfzePMWivuraIHDQ00y awC13FwX+DrKdD14+XfmuzGRt1veDjWwrfx71Y7zM17KoIJXXUmni7LbHU4L2hUW9vTh fuXMziidpGSLMHxjkgR71ZB0ogbxvt0ATrWcPk0YyATMJomg1ThS5cP9mnlTs3MO+Xns TDNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=d5fGo9EJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a170906794600b00781599eb7d9si7372878ejo.542.2022.09.23.01.51.49; Fri, 23 Sep 2022 01:52:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=d5fGo9EJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230178AbiIWIkZ (ORCPT + 99 others); Fri, 23 Sep 2022 04:40:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbiIWIkM (ORCPT ); Fri, 23 Sep 2022 04:40:12 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A067A7AA1 for ; Fri, 23 Sep 2022 01:40:10 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id y3so26447947ejc.1 for ; Fri, 23 Sep 2022 01:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=U6zfmLFphAIrgL4F8F09QdcSH0hrlIdwizKDu5PkikA=; b=d5fGo9EJ+mdGp0vheSqN2Hhijx/dKv5fsFV58WjZSVHyiFgAxUovNWHOAE84sPek/Z 5vrwsM7X2ikO6yLQfP4W5LTl3MSNXBANu6MDdvVhsZeer+ZR6MwpiwU4FslP/kSWbfGL 68pYAHJ7isHIBd0VMrmpD7HUof9OGwyOjHB+E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=U6zfmLFphAIrgL4F8F09QdcSH0hrlIdwizKDu5PkikA=; b=HYPBLL+k3Pk/5b/k4CKRx5R+BZVJrpXiinnD5qqEx202PgTPPNaZNtBrdltjEzPn6H x3VDF0ylG5cmXYyNO1R4MRkpSAxHOQ3IPB9lc+9r38sJR81zLO0UBqrpRafDbiZqT86I 6HVE1oslUwotAWDsAnsp36vDU2dZQXfBNIWWZgTB4sIqee9d2YZ2lV5I7k1ywsjb8H9C M0I4//4hIANRuLK1vQ+V4bL8qGz/DKKdYQht6SQVIF7XJK5lGWD0DS97R+05+bFhw1M0 CXsKs68adbnV1QUzWWBsE7uxZgNIp6h/yuBkui9DFyYb2vw9QlZZKhvD3blLvFF3zs7l vJiw== X-Gm-Message-State: ACrzQf2aQjWr/dZydRW1P3V68vRlpv8d5ZOysfNoPgFlb1IO4wFKd9pH LMR3q2vmg+9YPXHTCmi9UGTSuv1eYrJBlIRR X-Received: by 2002:a17:907:7baa:b0:779:a71a:c8cf with SMTP id ne42-20020a1709077baa00b00779a71ac8cfmr6174626ejc.126.1663922408786; Fri, 23 Sep 2022 01:40:08 -0700 (PDT) Received: from [172.16.11.74] ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id v18-20020a170906293200b007341663d7ddsm3750380ejd.96.2022.09.23.01.40.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Sep 2022 01:40:08 -0700 (PDT) Message-ID: <62a262a1-b945-ad4f-fdb8-d05fcba882d3@rasmusvillemoes.dk> Date: Fri, 23 Sep 2022 10:40:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v2 9/9] rtc: isl12022: add support for temperature sensor Content-Language: en-US To: Guenter Roeck , Alessandro Zummo , Alexandre Belloni , Jean Delvare Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org References: <20220830100152.698506-1-linux@rasmusvillemoes.dk> <20220921114624.3250848-1-linux@rasmusvillemoes.dk> <20220921114624.3250848-10-linux@rasmusvillemoes.dk> <8cb2bac1-3a03-09a1-c071-96ca4a95fa44@roeck-us.net> From: Rasmus Villemoes In-Reply-To: <8cb2bac1-3a03-09a1-c071-96ca4a95fa44@roeck-us.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/09/2022 16.13, Guenter Roeck wrote: > On 9/21/22 04:46, Rasmus Villemoes wrote: >> +static int isl12022_hwmon_read(struct device *dev, >> +                   enum hwmon_sensor_types type, >> +                   u32 attr, int channel, long *val) >> +{ >> +    if (type == hwmon_chip && attr == hwmon_chip_update_interval) { >> +        *val = 60000; >> +        return 0; >> +    } > > It is not the purpose of the update_interval attribute to inform the > user what the update interval of this chip happens to be. The purpose > of the attribute is to inform the chip what update interval it should use. Well, I think it's a completely natural thing to expose a fixed and known update_interval as a 0444 property, and it might even be useful to userspace to know that there's no point reading the sensor any more often than that. And I didn't come up with this by myself, there's already at least a couple of instances of a 0444 update_interval. I'll leave it to the RTC maintainers to decide, it's easy enough to remove. Rasmus