Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1405808rwb; Fri, 19 Aug 2022 03:10:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR5TzrjcJIWOgpP37kCv7hjt+r9jh8Edjb5l+fhiG+TQWUzBogkUl9IrYiI74oCXoRd/+ZSD X-Received: by 2002:a17:906:9b90:b0:738:60f9:c7d6 with SMTP id dd16-20020a1709069b9000b0073860f9c7d6mr4489439ejc.198.1660903857942; Fri, 19 Aug 2022 03:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660903857; cv=none; d=google.com; s=arc-20160816; b=JBU+r+BcAYBscd5hb+P2/WIgfbtFsuLjXaBZ6VhRVG59k5+Td/XKeYiqEwfIRIUh+v 0F28wb6qhnV+RUpVqoW00pDvcNbutTUs65DFF7iW5VN/y01qGQwUfWDrUH4QuzdrQIJy wyu1Hl/WU7KBsEwVU3fvcecwjSqOm2mMB6zH5u+fpolfz95xhopU4HT23vGVb0ikmaxt hPo5yhjo4ID5qDiAnPcNpY1AE6GrfLkWfPcp0em+w0xaFxmjm9k8qh8xn4iT3tfdXbOh n8h9KfEw6jkd3ob9nfAaZVJ+sE0DKuyNuPH4f0JvNig0+rUJ37kkjl7KB8aDu4h1oGgx 5fzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=FVAAlRtBOaHGmapqyqUoUe+9q/YeeMg/t5lfvLvs9nk=; b=UQqMPk4BbbOnif+LGrIj1UQD6Q3pUBZwNLR6Bw93oUx3Hngi315Boq0QZim4mFbAMv uP45rY1cGdlBYEh++YKfatuyXcowf0v42Z1+zxEice+k4RSn1XbI1arz0EKMM94EbbYD n/V6lOcfIdUOyDrMwFL2A+/SdP5OBGIKHjYBRvHDU9qn0Y/CqDQwtweP29Tr+2G+k2I8 42u7OtIhB3z9AqTiYkPKyrUb8e/jHBqITatixVNzV/b3X9bs450dExuK9xw24cQTJ/a6 Y5T0UYRIYoj/poagYo05vbDkdDeFelLN66RO3rkGExG5GQXcOJudsvPelzFvVpdSVSjF F4OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PePfK8oK; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c19-20020aa7d613000000b0043d0b64b70asi2586730edr.43.2022.08.19.03.10.31; Fri, 19 Aug 2022 03:10:57 -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=@gmail.com header.s=20210112 header.b=PePfK8oK; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348236AbiHSJ6z (ORCPT + 99 others); Fri, 19 Aug 2022 05:58:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347248AbiHSJ6x (ORCPT ); Fri, 19 Aug 2022 05:58:53 -0400 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09ADB52479; Fri, 19 Aug 2022 02:58:52 -0700 (PDT) Received: by mail-qk1-x729.google.com with SMTP id h27so2914512qkk.9; Fri, 19 Aug 2022 02:58:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc; bh=FVAAlRtBOaHGmapqyqUoUe+9q/YeeMg/t5lfvLvs9nk=; b=PePfK8oKU1V5oOAoCXeRxduRlABC1sSedAhdReOpRLsKI1A9FY/0cLo0lEkd17DlLV lgZXOv0qO1E1Gi0ekrmCoTV4mTw59cDAeweIC54HCv8OOCLLt/jE9Cg9WH1B+3zw5CYT 3DdIYxapUjmocouIHOBXPSvT8JIofmeFKTYqhNHfvKPzCk/kLD7aJpBahOIBqXMcBbAK Nz1MpvnJJ74JhbF8z6mS2tPYNfgaj+19+5ejNHh635Jq5YF8b0SikhQsG8EtjWw76qXC JyNfCpuhYjHLl3RGQ24rbVV/JIBsNaekwtIMrM5Kgx5QsA1nctsX2Ngy69S2FZormzzC 3iZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=FVAAlRtBOaHGmapqyqUoUe+9q/YeeMg/t5lfvLvs9nk=; b=VX7TQg+bnpek9LUvOa9StdoxabZjOzYlIbFvsxVtzh8C92zoEn8rtNEe1I4rUxW9K3 jLZif18aWC7SNEEE629dLm3LFlxJ7FfpzZkqc8Cg/maxiEnxw58ZysBxLZWf1pA4We2K Bkfx2bxpkuxvbGZRaRdhLb3Yv2mRz+ZAOkwbeHyvI2DfWe0L16Y+YX2quh65knfyuoUC 01jk9ipMsIyxQaB3JQFv0Nb0feLELsmumJ3I8TJIdLcynRvmgGK/5xhSbiQXdBzzAu16 zwTT/QGNdw9tv9A7NjMgiMawWfl6mnwG9KMS+ZSmahW/SxAinRKLee+mWfwQX14AzYTZ We1Q== X-Gm-Message-State: ACgBeo0BYMtdbjqDJsYAqVuuI0zwhzXwhHFOezYwNt4tocpzjkNiU19n AQT9hMQlz8E7TCSsH4EkSEwF59zomP6Nmpm0kAIVzClrT//0GQ== X-Received: by 2002:a05:620a:288a:b0:6b8:fcfe:db02 with SMTP id j10-20020a05620a288a00b006b8fcfedb02mr4898726qkp.504.1660903131083; Fri, 19 Aug 2022 02:58:51 -0700 (PDT) MIME-Version: 1.0 References: <20220806152517.78159-1-andriy.shevchenko@linux.intel.com> <20220818232040.GA3505561@roeck-us.net> In-Reply-To: From: Andy Shevchenko Date: Fri, 19 Aug 2022 12:58:14 +0300 Message-ID: Subject: Re: [PATCH v1 1/3] hwmon: (pwm-fan) Make use of device properties To: Guenter Roeck Cc: Andy Shevchenko , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Linux Documentation List , Linux Kernel Mailing List , linux-pwm@vger.kernel.org, linux-hwmon@vger.kernel.org, Jonathan Corbet , Thierry Reding , Jean Delvare , Bartlomiej Zolnierkiewicz Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Fri, Aug 19, 2022 at 12:56 PM Andy Shevchenko wrote: > On Fri, Aug 19, 2022 at 2:41 AM Guenter Roeck wrote: > > On Sat, Aug 06, 2022 at 06:25:15PM +0300, Andy Shevchenko wrote: > > > Convert the module to be property provider agnostic and allow > > > it to be used on non-OF platforms. > > > > > > Add mod_devicetable.h include. > > > > > > Signed-off-by: Andy Shevchenko > > > Acked-by: Uwe Kleine-K=C3=B6nig > > > > I had another look at this patch. A substantial part of the changes > > is because device properties don't support of_property_read_u32_index()= , > > reworking the code to use device_property_read_u32_array() instead. > > Sorry, I don't like it, it results in a substantial number of unnecessa= ry > > changes. Device properties should support the equivalent of > > of_property_read_u32_index() instead to simplify conversions. > > Not all (device property) providers can have such API available. Are > you suggesting to > a) alloc memory for entire array; > b) cache one for a given index; > c) free a memory; > d) loop as many times as index op is called. > > Sorry, this is way too far and non-optimal in comparison to the > substantial number of unnecessary changes (two or three small > refactorings?). > > Another way is to provide a pwm-fan-acpi, which will be the copy of > the driver after this patch is applied. I don't think it's a very > bright idea either. That said, I will split a change for PWM cleaning up series and leave the rest on the hwmon maintainers to reconsider. --=20 With Best Regards, Andy Shevchenko