Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp1316234ybs; Mon, 25 May 2020 12:44:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzR8uBa77KkgXMX/YigyMz43torS/RM4syKyclRWHZkch1QKrhfRI/qAhFZyQ65bp+XwWcy X-Received: by 2002:a17:906:2ec6:: with SMTP id s6mr21607503eji.532.1590435844869; Mon, 25 May 2020 12:44:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590435844; cv=none; d=google.com; s=arc-20160816; b=U6U2iJe4YU2xENdzsllf7X+SKq5n7pJKmnnREShUge9cw4MhOVB9vvClLFrUzyY9SI zlX0yN6EVYVbAYEFbVYmjvwdJeAXTbZkApky9xDNDnVk3HUa3g50CSGae0peMcex5u2X aryGwhFReH6Jc8a6M6a4V70rV7TfazWfvvbD1g3ZwX+gIh7p/G9i1/LDXAuldIFsNaBl 9RJsj8y1F7Klxev3dCH3wl3+WZswZ9pU51JXOQpK2rrp2jiK0w+wVnuct2UswxhJ6Wlh GiNKE3FB5+YcGSfVimxeeSeDE5Y0v6MzfpZDRKJFrWHgdJ2Ai1ZDNxm9uyvGZOZiHMXz npUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=gA8rCbFLcfT6/2k2eeWbowBAg0LuDHVUD30KyOBE/jc=; b=NQCAXhiVPVWDTTas8YnyzZcaBoV/g26HdqFqjfxrnOLuoUz4hLscxEGIiLYRh5ovA+ 5akmDgTTY82ruxWvwHANLgHEhCH7jc9fONdYzlQsRkLZ0nyDsG4a8/oACj1g/sTPttgj UPfi2QLiPYSsYEf+Kiu6cZ3E+P1X3kH4D/4/m04Ba++3SVxU5dorxS4z09qFeJEyrCvh sS0AyLF+srHLDz0jHP2wZASlM4fnjiMkkHe+buQUW1vsnDnw3gx7z7YOxeaTpi7AAKdd jyRGKGVcF6zpSG4f6VSdJ4z8CP8c2N8gVVfrffGaV8s9YY+JLIuqV6+GtSqAS6EGNASw 5chw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w19si10932518edl.336.2020.05.25.12.43.42; Mon, 25 May 2020 12:44:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390747AbgEYNQM (ORCPT + 99 others); Mon, 25 May 2020 09:16:12 -0400 Received: from mga18.intel.com ([134.134.136.126]:64597 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388757AbgEYNQL (ORCPT ); Mon, 25 May 2020 09:16:11 -0400 IronPort-SDR: gFHRJKf/fzgIkRWbiRwQ2XSMYXB/UwWQlvks7Qjuvw81DiGAx6fXNJa7e+QLXifs6GBibN5hzl Fzb8HExQv0hw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 May 2020 06:16:11 -0700 IronPort-SDR: 29F1ZN30wZD0n3NYF9s7La+3jVNm76brsOCh1moocqg5VGKKI5v9XVZenm7WyJTxli7pWH8e+R a2bJsIDr/DYg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,433,1583222400"; d="scan'208";a="266147156" Received: from mylly.fi.intel.com (HELO [10.237.72.67]) ([10.237.72.67]) by orsmga003.jf.intel.com with ESMTP; 25 May 2020 06:16:06 -0700 Subject: Re: [PATCH v2 08/12] i2c: designware: Introduce platform drivers glue layer interface To: Serge Semin Cc: Serge Semin , Andy Shevchenko , Mika Westerberg , Alexey Malahov , Thomas Bogendoerfer , Paul Burton , Ralf Baechle , Rob Herring , Frank Rowand , linux-mips@vger.kernel.org, devicetree@vger.kernel.org, Wolfram Sang , "Rafael J. Wysocki" , Hanjun Guo , Hans de Goede , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org References: <20200306132001.1B875803087C@mail.baikalelectronics.ru> <20200510095019.20981-1-Sergey.Semin@baikalelectronics.ru> <20200510095019.20981-9-Sergey.Semin@baikalelectronics.ru> <4950bb1e-302f-947e-1924-452a8169b504@linux.intel.com> <20200521023735.mja62ujmxebgwyef@mobilestation> From: Jarkko Nikula Message-ID: <80cf1d67-5de1-f3f1-27a0-b88cc105b228@linux.intel.com> Date: Mon, 25 May 2020 16:16:05 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200521023735.mja62ujmxebgwyef@mobilestation> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi On 5/21/20 5:37 AM, Serge Semin wrote: > On Wed, May 20, 2020 at 03:46:11PM +0300, Jarkko Nikula wrote: >> Hi >> >> On 5/10/20 12:50 PM, Serge Semin wrote: >>> Seeing the DW I2C platform driver is getting overcomplicated with a lot of >>> vendor-specific configs let's introduce a glue-layer interface so new >>> platforms which equipped with Synopsys Designware APB I2C IP-core would >>> be able to handle their peculiarities in the dedicated objects. >>> >> Comment to this patch and patches 9/12 and 12/12: >> >> Currently i2c-designware-platdrv.c is about 500 lines of code so I don't >> think it's too overcomplicated. But I feel we have already too many Kconfig >> options and source modules for i2c-designware and obviously would like to >> push back a little from adding more. >> >> I don't think i2c-designware-platdrv.c becomes yet too complicated if Baikal >> related code is added there, perhaps under #ifdef CONFIG_OF like MSCC Ocelot >> code is currently. > > Well, it's up to you to decide, what solution is more suitable for you to > maintain. My idea of detaching the MSCC and Baikal-T1 code to the dedicated > source files was to eventually move the whole i2c-designware-* set of files > into a dedicated directory drivers/i2c/buses/dw as it's done for some others > Synopsys DesignWare controllers: drivers/pci/controller/dwc/, drivers/usb/dwc2, > drivers/usb/dwc3, drivers/net/ethernet/synopsys/ . If you think, that it's too > early for Dw I2C code to live in a dedicated directory, fine with me. I can > merge the MSCC and Baikal-T1 code back into the i2c-designware-platdrv.c . > So what's your final word in this matter? > I think sub directory decision under each subsystem is more subsystem rather than vendor/driver specific. Good point anyway. For this patchset I'd like more if changes are done to i2c-designware-platdrv.c since it's not too complicated yet :-) If it starts to look too messy in the future then it's time split I think. Jarkko