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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 37686C61DA4 for ; Thu, 2 Feb 2023 09:00:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jfwwK6hfHuy9k4uSnJarwPLB921GhRvKk3zbroSp6XY=; b=qtgIUAnOadc66l ggrBRk5i+C3IXlTHATMAYULxy9CH0+xTl8EwIQeZxbxaHgmgS5k6lZvHIMvZIZMyVlJnZTwacxJKl SjpocOIO8iCcKt/LKqh1sngC8ZjwHSUJOVlX89iq2TuXWjK6CCxw4uj+F7LuurcGK7BunCaKhgbMW Kv5u1SlWF0MKS1rPMEJPSa7vhhmHbqcMLOwtbiOQ553mILrTD2ht0otWOpoFfrH4LDuNVWRWQQhkK qTTTP+5hZ9d8o7JJCS9XULQ+2M0qSrxGFXPohDN27fMGURPnEc0A38pS9OeXmeaXerKpD/326+PLE XX9RFtJllmUukwKaTl6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNVRI-00F3v1-NV; Thu, 02 Feb 2023 08:59:28 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNVRF-00F3tt-9t for linux-arm-kernel@lists.infradead.org; Thu, 02 Feb 2023 08:59:26 +0000 Received: by mail-wm1-x332.google.com with SMTP id k16so817283wms.2 for ; Thu, 02 Feb 2023 00:59:25 -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:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=hsJTBdBXvAT2vsiyDP+3ee1Ylym3acJqhZJzhX5LOJg=; b=KqQd7vhYI/iZ+SraS3+jN430dfeWKtC7dQnvjMKqIgRPLJA30+f3hzCpZZewoikvJa m6PK4TtaZzorXOGT3aK5T6PYaL82MiShIBQTta83ILNmB0ykCKJMtH91DkZnYafIzDoj RwaWjglaAb9oKO5PeA1IU4Y7hjLpxh+4R4A/k490DbyoEOBAiNFQXeJfxiN6LrtPlW9c E1hNfCpOESx332k4wS7LaY7LdMhrxH0+SBPnA5JOj5mDuy5/IBfbTrFQey3UWAtiMD0Q paDsz1GLNSkxTNJhx+HEJHu90oitIUQw1FAdQQqzYeB81e4C0bNJMbIRmiWssWqZPk9v TY7w== 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: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=hsJTBdBXvAT2vsiyDP+3ee1Ylym3acJqhZJzhX5LOJg=; b=EJKuM1gnA7dbEHvVo1hMV1m2hpAk0CBgXUlaAUND8Z8TC0kuF99CwB5kDELsQHFPVV I9am/VK/mQwWnz14ejCtjJwyjV5otAt/RKJnUfZaBjlW4z7Koydn6nTsrqz459Oyw+jo +KxDaNP4XWxnYBoSWOsPT1wFQ4+Afc3flGCnxJBOMVAiAQDe2TqPm7wcRJpgv4erG32i 7wdGv3p6ppfMDS6NFmAJ7LUUUscfwrNlz0OJErSGNRMYF1QmYkdoI8lOa+aBBw7Lf/YJ HzUUickiFFOkbuY4yovaaD4JXKFlg/EfzM66CaPYrb1aN2GfizCr+QsHIw5dflx5+pjL Z6dA== X-Gm-Message-State: AO0yUKVLBWliH6NdTQ1gDpcQ0e/0ys+k7YunRW77ZwNHoGaeRf+1u/l3 TMdp065ZmD7UYX+E/p13FlZzmQ== X-Google-Smtp-Source: AK7set9/1FcFxPrq0WBVJMLzwCimgSNxARmXcry+CIZV/rUvfMFDq00iEwXyb32WVU4crlOmtuH89A== X-Received: by 2002:a05:600c:314a:b0:3d9:f559:1f7e with SMTP id h10-20020a05600c314a00b003d9f5591f7emr1288370wmo.20.1675328364085; Thu, 02 Feb 2023 00:59:24 -0800 (PST) Received: from [192.168.1.109] ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id x14-20020a1c7c0e000000b003daffc2ecdesm4151880wmc.13.2023.02.02.00.59.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Feb 2023 00:59:23 -0800 (PST) Message-ID: <0555a7ae-60b7-a10d-e444-c0b6c3a2cf59@linaro.org> Date: Thu, 2 Feb 2023 09:59:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v4 3/3] i2c: aspeed: support ast2600 i2c new register mode driver Content-Language: en-US To: Ryan Chen , Rob Herring , Krzysztof Kozlowski , Joel Stanley , Andrew Jeffery , Philipp Zabel , openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20230201103359.1742140-1-ryan_chen@aspeedtech.com> <20230201103359.1742140-4-ryan_chen@aspeedtech.com> From: Krzysztof Kozlowski In-Reply-To: <20230201103359.1742140-4-ryan_chen@aspeedtech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230202_005925_386653_9F960CF4 X-CRM114-Status: GOOD ( 23.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 01/02/2023 11:33, Ryan Chen wrote: > Add i2c new register mode driver to support AST2600 i2c > new register mode. AST2600 i2c controller have legacy and > new register mode. The new register mode have global register > support 4 base clock for scl clock selection, and new clock > divider mode. The i2c new register mode have separate register > set to control i2c master and slave. > > Signed-off-by: Ryan Chen > --- > MAINTAINERS | 10 + > drivers/i2c/busses/Kconfig | 11 + > drivers/i2c/busses/Makefile | 1 + > drivers/i2c/busses/i2c-ast2600-global.c | 94 ++ > drivers/i2c/busses/i2c-ast2600-global.h | 19 + > drivers/i2c/busses/i2c-ast2600.c | 1811 +++++++++++++++++++++++ > 6 files changed, 1946 insertions(+) > create mode 100644 drivers/i2c/busses/i2c-ast2600-global.c > create mode 100644 drivers/i2c/busses/i2c-ast2600-global.h > create mode 100644 drivers/i2c/busses/i2c-ast2600.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index 749710e22b4d..67d338d834b4 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -3209,6 +3209,16 @@ S: Maintained > F: Documentation/devicetree/bindings/usb/aspeed,ast2600-udc.yaml > F: drivers/usb/gadget/udc/aspeed_udc.c > > +ASPEED AST2600 I2C DRIVER > +M: Ryan Chen > +L: linux-aspeed@lists.ozlabs.org (moderated for non-subscribers) > +S: Maintained > +F: Documentation/devicetree/bindings/i2c/aspeed,i2c-ast2600-global.yaml > +F: Documentation/devicetree/bindings/i2c/aspeed,i2c-ast2600.yaml > +F: drivers/i2c/busses/i2c-ast2600-global.c > +F: drivers/i2c/busses/i2c-ast2600-global.h > +F: drivers/i2c/busses/i2c-ast2600.c > + > ASPEED XDMA ENGINE DRIVER > M: Eddie James > L: linux-aspeed@lists.ozlabs.org (moderated for non-subscribers) > diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig > index 7284206b278b..5ef3ee6aa70f 100644 > --- a/drivers/i2c/busses/Kconfig > +++ b/drivers/i2c/busses/Kconfig > @@ -389,6 +389,17 @@ config I2C_ALTERA > This driver can also be built as a module. If so, the module > will be called i2c-altera. > > +config I2C_AST2600 > + tristate "Aspeed AST2600 I2C Controller" > + depends on ARCH_ASPEED || MACH_ASPEED_G6 || COMPILE_TEST MACH_ASPEED_G6 is useless and redundant > + select I2C_SMBUS > + help > + If you say yes to this option, support will be included for the > + Aspeed I2C controller with new register set. > + > + This driver can also be built as a module. If so, the module > + will be called i2c-new-aspeed. > + > config I2C_ASPEED > tristate "Aspeed I2C Controller" > depends on ARCH_ASPEED || COMPILE_TEST > diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile > index c5cac15f075c..ce83dfdc2094 100644 > --- a/drivers/i2c/busses/Makefile > +++ b/drivers/i2c/busses/Makefile > @@ -38,6 +38,7 @@ obj-$(CONFIG_I2C_POWERMAC) += i2c-powermac.o > obj-$(CONFIG_I2C_ALTERA) += i2c-altera.o > obj-$(CONFIG_I2C_AMD_MP2) += i2c-amd-mp2-pci.o i2c-amd-mp2-plat.o > obj-$(CONFIG_I2C_ASPEED) += i2c-aspeed.o > +obj-$(CONFIG_I2C_AST2600) += i2c-ast2600-global.o i2c-ast2600.o Why this cannot be merged to existing driver? The same question for bindings... actually let me comment on this separately. (...) > +static const struct of_device_id ast2600_i2c_global_of_match[] = { > + { .compatible = "aspeed,ast2600-i2c-global", }, > + { }, > +}; > +MODULE_DEVICE_TABLE(of, ast2600_i2c_global_of_match); This not how it works. You cannot have two drivers in one module. (...) > + > +static const struct of_device_id ast2600_i2c_bus_of_table[] = { > + { > + .compatible = "aspeed,ast2600-i2c", NAK. We already have it. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel