Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3528533pxb; Mon, 4 Apr 2022 20:02:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyO4wrNkdEu5UdJt0gr7PeKWT3LqKpXgSD34vPWzZ7XYmRWhecGK6Q0P3agB+nDciVK8yld X-Received: by 2002:a05:6a00:10d0:b0:4f7:5af4:47b6 with SMTP id d16-20020a056a0010d000b004f75af447b6mr1425389pfu.6.1649127777526; Mon, 04 Apr 2022 20:02:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649127777; cv=none; d=google.com; s=arc-20160816; b=HkvQ/LXK27jLBmAXkzZxX6inUD1fzEI92maPnxWvaoBVwmT2gptO2yFoCksLcgOrzC ctkQYox+j6ZqrsCmpoztnh7nlEs6NzMFJ7OoIwpFlQFKzIBERYgJZ3v0fETEWsKa7qw8 arfSQAEGL50P8RMS5Ra6KR21rXM5or4zoDKlMHrX2FgvialVuaTUAq2OrzqtvoczU8c5 fJpWDXW+NeZBnbeMUBo+X41y6OsjLW1P4JfKfqlB9d9xhYIyeuSE1RejyASCMmZhcm2E 88udh7sx6zoRMlBUbfk+qcm3wocVgvcT4RBkkjlVCZ3W4+Q78ODRU1kiaEoKu3nLKu2r z5Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=xfXVG2LWmlhxvH9mQkRRvHM6oog3iVL1XZEsuBNjm/c=; b=sPqY2DBcE/34YPwaOo07Bgo19w7ZDt8YEA7gJGEo6rTNoj/YC1tfnEbF7ZEF+tRJPp e37IeIMggH3htaJD3o0ZqcuAfMEFfdeP8vMLJhOJNRWZx8HoYbPiMLcdoodw8T0IxXn1 Z1V+sXXksqnJOYGQ+q5roClJhvLrdAf6m9X4gC/YGh8UogGTvKszMKKb+REOtTvDMnrz +f5UI5UREW3KSf25ehLYo38xTBf+8ovHRCEZR8rUYT2spYv9kc2UdXJKCMnZv1WGA954 x4Z/6ef1KP/KmcGGCC6G1yW0ogm/IOlt4CN51zanw/zuljqD5C8Z4X6IvAvPAicXhLcZ Ylig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FkabnPyz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x202-20020a6331d3000000b0038652e0fde8si12326135pgx.270.2022.04.04.20.02.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 20:02:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FkabnPyz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 978691A12AA; Mon, 4 Apr 2022 18:27:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380908AbiDDVtK (ORCPT + 99 others); Mon, 4 Apr 2022 17:49:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379332AbiDDRAg (ORCPT ); Mon, 4 Apr 2022 13:00:36 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7F06C1E5 for ; Mon, 4 Apr 2022 09:58:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649091517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xfXVG2LWmlhxvH9mQkRRvHM6oog3iVL1XZEsuBNjm/c=; b=FkabnPyzuQY1gBbj5C9GUgZTRhhOwwSb/xionwfjJ1CPRxT+Adn+PmKdir4KF6GlMfXYhd BAbKbNkihJ2RjPL5vHzaiMmH+AdAlgAzCMYaup0NgULA0Jht6ccKAA1P/wX3eYCWVAOhwC s2zqOBmW4L2c0XAkb6LRmiZ31BPfICs= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-171-2QF1NC0nM0aq3MLC5g2CbQ-1; Mon, 04 Apr 2022 12:58:36 -0400 X-MC-Unique: 2QF1NC0nM0aq3MLC5g2CbQ-1 Received: by mail-wr1-f72.google.com with SMTP id u30-20020adfa19e000000b00206153b3cceso728515wru.1 for ; Mon, 04 Apr 2022 09:58:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=xfXVG2LWmlhxvH9mQkRRvHM6oog3iVL1XZEsuBNjm/c=; b=b5RjYM703EaMXmnuYeGWCV7wYmhqTMyPfBjjm5Zvpjy/1HG8C18qPS8tdIqTTUadK6 Ps9Adx/66D/JIj+nVKxsF4BsNr9S90Hw68nGn6yF2qHWi4qRnrCb+Zwb2df3MXSDXL0i yj7hiFHEK/m3WReh8huZawuXspJ/hUs+/EgX1d5XtJE9WovEWxwdKhdVlFn5CjEdBPhl 27xAtdjSg9Fg5vO17nEHuCeEr4DkhI76hj4Cgrn01xpXCXMwcwYrg1MD0jz9IlUQZlqY BAogcB6PSvk29JsZkp4VzP1FDRobhb6rMdwGBViSLuWMnRDeZUmLkmfQXM7wl2edcJYQ nNGg== X-Gm-Message-State: AOAM532XINsAazdbRnVDATphhQzhYb105uqT7WiJPl1N2LD8C5oYbttb l1lYWbNUHrbmTvGRhkGy3h+wZHW8x3l8MFHR+bmsbISBEbakrYkuyErLulOpQZTkHThAKPOQP+W /H9PEO2YLH2nREa6LNqM9zi/3 X-Received: by 2002:a5d:410c:0:b0:206:b5c:65c7 with SMTP id l12-20020a5d410c000000b002060b5c65c7mr534237wrp.94.1649091514694; Mon, 04 Apr 2022 09:58:34 -0700 (PDT) X-Received: by 2002:a5d:410c:0:b0:206:b5c:65c7 with SMTP id l12-20020a5d410c000000b002060b5c65c7mr534220wrp.94.1649091514448; Mon, 04 Apr 2022 09:58:34 -0700 (PDT) Received: from [192.168.1.102] ([92.176.231.205]) by smtp.gmail.com with ESMTPSA id r14-20020a05600c35ce00b0038c9f469979sm38126wmq.40.2022.04.04.09.58.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Apr 2022 09:58:33 -0700 (PDT) Message-ID: <0d296685-0769-d669-b3fd-d5ca26717c64@redhat.com> Date: Mon, 4 Apr 2022 18:58:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH 2/4] dt-bindings: display: ssd1307fb: Add entry for SINO WEALTH SH1106 Content-Language: en-US To: wens@kernel.org Cc: Javier Martinez Canillas , Maxime Ripard , Rob Herring , Krzysztof Kozlowski , David Airlie , Daniel Vetter , devicetree , Linux Kernel , dri-devel References: <20220330190846.13997-1-wens@kernel.org> <20220330190846.13997-3-wens@kernel.org> <92a46ea2-e23e-b7c8-ea5f-35d458ee1b76@redhat.com> From: Javier Martinez Canillas In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/4/22 18:11, Chen-Yu Tsai wrote: [snip] >>> >> >> tl; dr: unfortunately we can't do it due how SPI and I2C report module >> aliases. Otherwise module auto loading will not work. I wrote a much >> longer explanation with some details not so long ago: >> >> https://patchwork.kernel.org/project/dri-devel/patch/20220209091204.2513437-1-javierm@redhat.com/#24730793 > > Right. I think that crossed my mind at some point, but didn't stick. > Thanks for raising it again. :) > >> BTW, I bought a SSD1306 SPI controller and go it working this weekend. >> >> I plan to post the patches once yours land, to avoid in-flight series >> that may conflict. And what I did is mark the -fb as deprecated, then >> added "ssd130x-i2c" and "ssd130x-spi" compatibles strings. >> >> The WIP patches can be found here in case you are interested: >> >> https://github.com/martinezjavier/linux/tree/drm-ssd130x-spi > > I took a quick look and a couple things stood out: > > 1. Would 3-wire SPI ever be considered? If so, might want to > rename some of variables/functions as *_spi_4wire_* to > begin with. > That's a good question and something that I considered too. I have to admit that never had a SPI device that uses the 3-wire scheme though so I don't know how common that is. The ssd1306 datasheet mentions that the chip supports it but I could not find one to buy. Read that should be able to do it by soldering some pads in the board but that wold be more hustle that would like. For that reason I just went with only supporting 4-wire and someone if really like could provide patches for 3-wire SPI. > 2. Maybe we should move the ssd130x_deviceinfo stuff into the > core module, and define an enum to use for matching compatible > strings across the modules to their respective device info > entries? FYI we are doing this in drivers/mfd/axp20x* . > Yes, that's a good idea. I'll add that refactoring as a part of the SPI series. Thanks a lot for the suggestion, it was very useful. > I think a friend of mine has a SPI based SH1106 module that I > could borrow and test/work on, but that's a big if. > > Cool. If it uses 4-wire too then I believe that would mostly work out-of-the-box if you add a compatible string for it. I didn't have to do any change in the core ssd103x driver for the ssd1306 SPI to work. > Regards > ChenYu > -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat