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 7466CEC873E for ; Thu, 7 Sep 2023 15:37:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234281AbjIGPhs (ORCPT ); Thu, 7 Sep 2023 11:37:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245668AbjIGP35 (ORCPT ); Thu, 7 Sep 2023 11:29:57 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B4F8171C; Thu, 7 Sep 2023 08:29:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694100568; x=1725636568; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=hD3LejHxGSj1Y4O7RxxMtwEUlF2sJ4z4g4K8ODPu3sY=; b=KaVLjZF6ZgH0ifcU1nwqydEai3CeOp16k+eTqEd3g/5pfDecwP2j+sYZ NQPy1H7Xxirib9J+xKAhdXtAd75spx+2t3e8jxvscJj899erH4yEFMTo4 +Mv7lRZVM2NvLXelVFA8aTrMMuwcHCYH0fu9665YrYz7m7OPolZfa6OiU u3STG8jpHWx1dnsKwolgYN/r96k8TTp0eyOiNPg928vZiyPd5q9CgWbwO HINZGqIQBHXlsFrAbAV7oH0D0ZoiVt1hEb0l7To6a/InsQHiTZRbrDwCx n6i7+1lUQ9vrboDguu4P97/nUPKQMHr1Wc4YZ/4Etii3hxdPIF8qVwPtc g==; X-IronPort-AV: E=McAfee;i="6600,9927,10826"; a="357675749" X-IronPort-AV: E=Sophos;i="6.02,235,1688454000"; d="scan'208";a="357675749" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2023 07:11:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10826"; a="735514227" X-IronPort-AV: E=Sophos;i="6.02,235,1688454000"; d="scan'208";a="735514227" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga007.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2023 07:11:18 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qeFj1-007KK9-1d; Thu, 07 Sep 2023 17:11:15 +0300 Date: Thu, 7 Sep 2023 17:11:15 +0300 From: Andy Shevchenko To: Biju Das Cc: Eric Tremblay , Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Biju Das Subject: Re: [PATCH v6 1/2] hwmon: tmp513: Add max_channels variable to struct tmp51x_data Message-ID: References: <20230907071404.24334-1-biju.das.jz@bp.renesas.com> <20230907071404.24334-2-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230907071404.24334-2-biju.das.jz@bp.renesas.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org On Thu, Sep 07, 2023 at 08:14:03AM +0100, Biju Das wrote: > The tmp512 chip has 3 channels whereas tmp513 has 4 channels. Avoid > using tmp51x_ids for this HW difference by replacing OF/ID table > data with maximum channels supported by the device. > > Replace id->max_channels variable from struct tmp51x_data and drop the > macros TMP51{2,3}_TEMP_CONFIG_DEFAULT as it can be derived from the macro > TMP51X_TEMP_CONFIG_DEFAULT and update the logic in tmp51x_is_visible(), > tmp51x_read_properties() and tmp51x_init() using max_channels. > > While at it, drop enum tmp51x_ids as there is no user and remove > trailing comma in the terminator entry for OF table. LGTM, FWIW, Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko