From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75968C433F5 for ; Mon, 28 Feb 2022 08:32:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234019AbiB1IdG (ORCPT ); Mon, 28 Feb 2022 03:33:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233963AbiB1IdE (ORCPT ); Mon, 28 Feb 2022 03:33:04 -0500 Received: from thorn.bewilderbeest.net (thorn.bewilderbeest.net [IPv6:2605:2700:0:5::4713:9cab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16DC021AA; Mon, 28 Feb 2022 00:32:24 -0800 (PST) Received: from hatter.bewilderbeest.net (174-21-187-98.tukw.qwest.net [174.21.187.98]) (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: zev) by thorn.bewilderbeest.net (Postfix) with ESMTPSA id AA922586; Mon, 28 Feb 2022 00:32:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bewilderbeest.net; s=thorn; t=1646037144; bh=CCCJGLwREFudXAQ71006Rww33yHRQbbj3lk5h/iUP7I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DSLlx5cpu6/a3Z/YK5BUN+3pKJVP2HvMkrVnWDg5ngfiReScKDSrUrRYagxb8EEAV xlTlmYlbiISSanrSe/gT5KWmFVlnlIxpwqWTPLSgGkA6JG9Z7UkN3ha1pckO11vYyY 9ttb1mGvnXpmAnThWty/HDef4OFb6Ngeo8xXY20E= Date: Mon, 28 Feb 2022 00:32:23 -0800 From: Zev Weiss To: Guenter Roeck Cc: linux-hwmon@vger.kernel.org, Jean Delvare , Renze Nicolai , openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/5] hwmon: (nct6775) Split core and platform driver Message-ID: References: <20220227154447.GA766647@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20220227154447.GA766647@roeck-us.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 27, 2022 at 07:44:47AM PST, Guenter Roeck wrote: >On Sat, Feb 26, 2022 at 05:30:45AM -0800, Zev Weiss wrote: >> This splits the nct6775 driver into an interface-independent core and >> a separate platform driver that wraps inb/outb port I/O (or asuswmi >> methods) around that core. >> >> Signed-off-by: Zev Weiss > >I think it would be much better to convert the entire driver to regmap >and not just use regmap for i2c. This way all register read/write >operations can be hidden behind regmap, and the read/write callbacks >are unnecessary. The tmp401 driver gives an example how to do this - >essentially implement reg_read and reg_write functions in struct >regmap_config, then handle all register accesses through regmap. > >Couple of additional comments inline. > Alright, that sounds reasonable -- I'll work on an entirely regmap-based v2 (and address the other points as well). Thanks, Zev