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 D3B93C677F1 for ; Wed, 22 Feb 2023 18:47:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232027AbjBVSrg (ORCPT ); Wed, 22 Feb 2023 13:47:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230310AbjBVSre (ORCPT ); Wed, 22 Feb 2023 13:47:34 -0500 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D719741B67 for ; Wed, 22 Feb 2023 10:46:55 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id d41-20020a05600c4c2900b003e9e066550fso635543wmp.4 for ; Wed, 22 Feb 2023 10:46:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=skuCIMzdXVRwoYI+VmugGgits0upO5wf/eyqFb3T6p0=; b=ZRVz9U8eOgOEdv9yLJQJC9zAil69EdrhWJT9TuFbvf8r9kE2tIwdmF5Oy5d98mYnXa sDK1BjxsSP49nTHhvFlr/fwV0qcVQbYE1u/VuKH1u4LHc4WwDN8SdtRsbdFT+ijVXE04 4k8fEfWO8SByWXviMlERIjWJF/ud+GOHUNvaV6ld5W0TkbMleggjJj+zkOxxSazNW5E4 3br8kRp+aasBSQOyuG2fyjee+po5ajeuLg094pyZg14QcXc4RckisHauGy9z7uh9nI+W ac/wja/VbT1+vECtjfCyDLTaF8P3Ia1ncXCa/wjRQNrbGZALuYIkwDWFyzrnBA+/0zCH 1UWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=skuCIMzdXVRwoYI+VmugGgits0upO5wf/eyqFb3T6p0=; b=Es53ZIwsDAh0DkWQdha/XfzTahetpbE4FSYs1j2Q5hIbU3ae4wOiE/kBfhywrSvHkE M5Nze0Q8dJXck9HXbFU6EQC5AEEX83k4C4SBLulO7sbQmG/swIou6vLKH1KjYG1rgwlk xsMdqBBNZw6TPStLfuJ/qKK74mYo1L/VBAfmj7IjK+JxtS225Ol7hn59SMYzmsioXGqD YLrngQFzIos9bdanhQ+5vLccSYXAPZDXdDLuqoND1Td84zQ6ObLvUpmfTpn5CiMDW7H7 zA/ac8jI/RTsqvK0XNJnfqYj2PjZJFgsgn9Ue4FQ8C0wyjNaIAmPkNEMGqs+hDEMqrq7 cVAg== X-Gm-Message-State: AO0yUKV9PGBKwR2dIFKlho9I3VXCRfvUJRUx3/R/YJr5Vi8KcHOsRAmd AEsQA4sYsVCqi+kfqnJC6blgEQ== X-Google-Smtp-Source: AK7set9+LFmeEbLy5YAz6Ze7EnEQPH7JVkRV7xkmNU+cJ2jCtT0NaFWu+u650El0GShdrYOP4Dz91A== X-Received: by 2002:a05:600c:3196:b0:3da:acb1:2f09 with SMTP id s22-20020a05600c319600b003daacb12f09mr6996815wmp.19.1677091587670; Wed, 22 Feb 2023 10:46:27 -0800 (PST) Received: from [192.168.1.109] ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id e7-20020adffc47000000b002c70f5627d5sm210876wrs.63.2023.02.22.10.46.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Feb 2023 10:46:27 -0800 (PST) Message-ID: <06f29d66-f16a-039c-ecd0-155bdcce00c1@linaro.org> Date: Wed, 22 Feb 2023 19:46:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v1 2/3] auxdisplay: ht16k33: Make use of device_get_match_data() Content-Language: en-US To: Andy Shevchenko , Robin van der Gracht , Rob Herring , Krzysztof Kozlowski Cc: "Russell King (Oracle)" , Raul E Rangel , Wolfram Sang , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-usb@vger.kernel.org, Miguel Ojeda , Heikki Krogerus , Greg Kroah-Hartman , devicetree@vger.kernel.org References: <20230221133307.20287-1-andriy.shevchenko@linux.intel.com> <20230221133307.20287-3-andriy.shevchenko@linux.intel.com> <0235f0fed989a8b027db720663699f5d@protonic.nl> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/02/2023 18:20, Andy Shevchenko wrote: >> >>> Which effectively breaks i.e. user-space instantiation for other display >>> types which now do work due to i2c_of_match_device(). >>> (so my suggestion above is not sufficient). >>> >>> Are you proposing extending and searching the I2C ID table to work around >>> that? >> >> See (1) above. This is the downside I have noticed after sending this series. >> So, the I²C ID table match has to be restored, but the above mentioned issues >> with existing table are not gone, hence they need to be addressed in the next >> version. > > I see now what you mean. So, we have even more issues in this driver: > - I²C table is not in sync with all devices supported Does anything actually rely on i2c_device_id table? ACPI would match either via ACPI or OF tables. All modern ARM systems (e.g. imx6) are DT-based. Maybe just drop the I2C ID table? > - the OF ID table seems has something really badly formed for adafruit > (just a number after a comma) Maybe it is a model number? It was documented: Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml > > The latter shows how broken it is. The I²C ID table mechanism is used as > a backward compatibility to the OF. Unfortunately, user space may not provide > the data except in form of DT overlays, so for the legacy enumeration we > have only device name, which is a set of 4 digits for adafruit case. > > Now imagine if by some reason we will get adafruit2 (you name it) with > the same schema. How I²C framework can understand that you meant adafruit > and not adafruit2? Or did I miss something? > Best regards, Krzysztof