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 4500AC433F5 for ; Tue, 19 Apr 2022 12:57:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243564AbiDSNAf (ORCPT ); Tue, 19 Apr 2022 09:00:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240912AbiDSNAb (ORCPT ); Tue, 19 Apr 2022 09:00:31 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00BE43388C; Tue, 19 Apr 2022 05:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=8WBVcaV6iEXDOrTecuRrSTx95lLOpawtAYD16O9vexE=; b=VjL15INsCpOnI7UDTwDOjC1Ccr Oz6NOqDOqp5VE8iQDKxVC9SNLs8DLGNJGXxHDAo4hYqT9q9MaPgReKl0744ilAFiowXf00llHmDL8 MY4a/6OUgQM7+RywlBbMU7wLSOJFOZ7ZpFjAa8y3DHNUIHM0OoWOa/a2spK3G5TkyxXY=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ngnQI-00GV3L-45; Tue, 19 Apr 2022 14:57:38 +0200 Date: Tue, 19 Apr 2022 14:57:38 +0200 From: Andrew Lunn To: =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= Cc: Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Heiner Kallweit , Russell King , Thomas Petazzoni , Herve Codina , =?iso-8859-1?Q?Miqu=E8l?= Raynal , Milan Stevanovic , Jimmy Lalande , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next 09/12] ARM: dts: r9a06g032: describe MII converter Message-ID: References: <20220415102453.1b5b3f77@fixe.home> <20220415163853.683c0b6d@fixe.home> <20220415172954.64e53086@fixe.home> <20220415184541.0a6928f5@fixe.home> <20220419110328.0241fb1f@fixe.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220419110328.0241fb1f@fixe.home> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Hum, that could be done but since only some values/combinations are > allowed, it would potentially require to validate the setting at each > request, leading to potential non working devices due to invalid MUX > configuration required. Yes, validation is messy, you have to incrementally validate as each device probes and requests its PCS. I would not only return -EINVAL, but also dump the current partial configuration to the kernel log. I guess the implementation would have a big table as shown in the datasheet. You walk the table trying to find a match for those settings you have so far, and wildcard those you don't know yet. Fun little coding problem. Andrew