Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1611002rda; Mon, 23 Oct 2023 19:36:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHb5xM+MTch+3pkCEaVSNrBMq2eIZcVni0PSdrFtNdcvR7Sd1ozshwysbkna5mylrapL6Jv X-Received: by 2002:a17:902:ec85:b0:1ca:7909:6ed4 with SMTP id x5-20020a170902ec8500b001ca79096ed4mr18994361plg.5.1698114984223; Mon, 23 Oct 2023 19:36:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698114984; cv=none; d=google.com; s=arc-20160816; b=EiOOgLfwwRvZJR6IrJJb269HabxjAW+9637/Wt2ENOVHDiN6wZDqHt11yy0JPgyXis sygsNNjQow6ioyuZeOL55PjYcHY+MkPi20EPMBTLbZXANSWswvRESQdwwTbLa0UiQlSq Lo3cGmbgvRCei9j5HDl7Rxg0CtxFAuxxesj7dfwZ81pz6CWb8r/ZvfbB2D0A8PDlQFe+ rTOroVHzRoEFRPSOPpPaYD9bH1GlL1ArUzIZQymVZcFNJBcpc1xJ6GkekCx7g4OJI2Fy YVtUOq0DzIvyaD4DxstNCBGaW66Zy3iv8JAXCEnCBuRtTCEt0acy8rHYstq9QMquhM8I EyuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:date:to:cc:from:subject:references :in-reply-to:content-transfer-encoding:mime-version:message-id :dkim-signature; bh=Q5OM8zqw2zTU56yqEkXyN/h5VL/CRznzcuemWZ4Rs7M=; fh=OmSJjJZ5xnMRR04srgB6/QtF01mHSUkoeULSyNsSq44=; b=f9YfQZwPVmfYQvRHuAGUyrit4nJUX3yn28NxFio1b03DQYkgp7JAZcihp1rXnq4CHo L/dZzdas36eNE4cUN3qc4L7y8mb2ZAl1eKhpnX4WP0zEhbodg2OWLnN88clmEm2mXaiJ pjyBV6JS2NKB+voCWQN4e0yWV/I5jMvG9IX8bs8b7okb0WbDL8/AmgKIrfEsYFnweQTI /LIJ+re0DisPrvJxY7+I0golAvQb47w4r2c9jAuZ5AC54WSFS4LSXZNn42ot8CxrXx44 8v2zICmKe42cU2wSLS/nFBpnZ/Pz6TM5C3cgACYzALO9RYgTfbaf6SR2LfWMIqKeoptT 7CxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hs2b5UDq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id s17-20020a170902a51100b001c9f54d26bfsi7244019plq.516.2023.10.23.19.36.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 19:36:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hs2b5UDq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 509E68069D8D; Mon, 23 Oct 2023 19:36:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232212AbjJXCgC (ORCPT + 99 others); Mon, 23 Oct 2023 22:36:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232023AbjJXCfy (ORCPT ); Mon, 23 Oct 2023 22:35:54 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D983C10D9; Mon, 23 Oct 2023 19:35:42 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54EFAC433CA; Tue, 24 Oct 2023 02:35:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698114941; bh=Q5OM8zqw2zTU56yqEkXyN/h5VL/CRznzcuemWZ4Rs7M=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=hs2b5UDqeY393JE+uSBUAt7n+HPyEIt+z2MOBLqksFSaPzbRimYeg36SYSh+owlz/ PDxevHw8dqQi3C8Xeh2mF97D8a3uORuooqWjoWSFyubnNmkgLs0UAwmx/t8HQnqkwk v1mk79YQhGXrrYVSsm7C8PREE1d6Le1Rya1N3HsUeTwfLJghDSJWz+TzTk/5qhZscP SdCGQeXS9nWcZM1D590CFYXw5nJ60hJVi1lo+VMp5QchM+OEWXcpTPf25i6G1eiWcE kSfE9oHwfACs9biD5tj7ovtBnxppLIddvsR+rTTdnrJ0Mk85XQiodiFxRSQddqeqEe L3TfzyizRiP8A== Message-ID: <961ca9d413ac51ff26d59f5190c8970e.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20230909155418.24426-1-biju.das.jz@bp.renesas.com> References: <20230909155418.24426-1-biju.das.jz@bp.renesas.com> Subject: Re: [PATCH] clk: clk-si544: Simplify probe() and is_valid_frequency() From: Stephen Boyd Cc: Biju Das , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Biju Das , Andy Shevchenko To: Biju Das , Michael Turquette Date: Mon, 23 Oct 2023 19:35:39 -0700 User-Agent: alot/0.10 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 23 Oct 2023 19:36:18 -0700 (PDT) Quoting Biju Das (2023-09-09 08:54:18) > The driver has an OF match table, still, it uses an ID lookup table for > retrieving match data. Currently, the driver is working on the > assumption that an I2C device registered via OF will always match a > legacy I2C device ID. The correct approach is to have an OF device ID > table using i2c_get_match_data() if the devices are registered via OF/ID. >=20 > Unify the OF/ID table by using max_freq as match data instead of > enum si544_speed_grade and replace the ID lookup table for > the match data by i2c_get_match_data(). This allows to simplify both > probe() and is_valid_frequency(). >=20 > Drop enum si544_speed_grade as there is no user. >=20 > While at it, remove the trailing comma in the terminator entry for the OF > table making code robust against (theoretical) misrebases or other similar > things where the new entry goes _after_ the termination without the > compiler noticing. >=20 > Signed-off-by: Biju Das > --- Applied to clk-next