Received: by 10.223.176.46 with SMTP id f43csp1035106wra; Fri, 26 Jan 2018 10:44:14 -0800 (PST) X-Google-Smtp-Source: AH8x2241aMycPRa6G/i3NrHLn5CK7naA95P68s8TGoYptZROrGgVA9YkKNS+WLArhIN/WBrxn4fg X-Received: by 2002:a17:902:44a4:: with SMTP id l33-v6mr6418456pld.115.1516992253904; Fri, 26 Jan 2018 10:44:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516992253; cv=none; d=google.com; s=arc-20160816; b=V3KXiI3s/yrrrSE/SbBRruhZnWO6P8B+hKDG0/oycM68/S89zxTEHb53QChFzupooq rqBFeMul41dxEmVYTYRjRI2UDNkNwv5yjV4jLa/V9GtnlP30d7JBs5kbcVFlbW/qz9Yx z5TLfJtlJk6ggL6MAhoeMf9zNz+mICCd1CyFaWlmHB5ortmamPscGNF01F4syC7VFKsb 3pf5/sYgJP1BbNQVxPk9ZwTbqt1zcMqIiEeA2Odo962KTXtKwzaek7jk6AqtOV7WVw7t OmflCgzciBLrW1CjXPD/YL9xzWpg/LrXAgrogmlfnOJWzYk+/MA6bsK4d0lAxGG1gOKM 4L3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=bJNLEDn6futVybyIE1zLcW1qKSYTs55VILwDQzCDtAc=; b=ohW7Nt36iRoAkj6TliSlc99QLQlYTxuaoOiRNLeuMEkac7s17WU3C0EbZhB2MoYqH1 jl8ScD5ASgRkjSMToFDYqM/VBZp1VSHAGH3IFTO4RcCgxIB+NCHhSKnfEi5ynPC6cBWj fWNR9gVJLOWRtEGyRnjyxJZHCZkVkiWeWXOroCk3uEzEa09yD1598Ty1NJ/mihLFU3gE 9V2QrQeBN8tq2djqaf89v0s/OB9lwB7/QvHjsCYKg/M1wya4BRukSihI1ryaaT73EU0T DbeEJvDxSLf4XF0oRScuhhBR6ht7MKlanT6IGwrXX0hA2C5i8Lvw99D0ot8AmnxHmfLp rVBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D8CkSTLC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7-v6si4082240pll.775.2018.01.26.10.43.59; Fri, 26 Jan 2018 10:44:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D8CkSTLC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752494AbeAZSn1 (ORCPT + 99 others); Fri, 26 Jan 2018 13:43:27 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:39627 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752221AbeAZSnZ (ORCPT ); Fri, 26 Jan 2018 13:43:25 -0500 Received: by mail-qt0-f193.google.com with SMTP id f4so3668314qtj.6; Fri, 26 Jan 2018 10:43:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bJNLEDn6futVybyIE1zLcW1qKSYTs55VILwDQzCDtAc=; b=D8CkSTLCA9YQV1tOkR8fojQh302lc0wrODEkbqCAgNvyrMKvJakHiBChzGJfQiLfu6 5VAfDfPdgBjOyRE0n7eguhkQa6WIW72uqW5HmA1caz+y9cNlHKQJEC3gI4Z5t5nZPKsL VTtARna1Og9mr6ahOiuFch/J7yFeEGfPuyuYpYM+xCIcCZgFpLdwb+RvOicwd9QNq4hr aMwwxkqTXtSHTryPBhwMnFaKN2qBl1/3QZkX5q3h9roOf+z0SvNrCs+GfMP1euNBimWF I1SuBislAUnjg5RK6Im0ImhuBFf3bkuYDvsuA5TSJ0EYZCpGXPzNRcP8vmugOil1Wp/w VdCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bJNLEDn6futVybyIE1zLcW1qKSYTs55VILwDQzCDtAc=; b=IYkjohkhvI1EuFljsZfU0yjiIGEv3mFaf0CD30uQJPu90J+Pcr93JfERopmoxhT5Rm 4LRJ/HIvv37ZA7tTpftwJQgjixYRYjBbw5uaS35aGNZ10joUemyl9PygpMAKjc6s4xDd 11blDepCY+E25+d47lovLJwJ2xTOWd2zhtFOv5eZZ3CGluqsXPXnVtWt0a5BaIRov3c9 JYm8QTTCEooDitALOpcE0mR71bGu2ND7EdHU60OUhll5DaMBrX37+2yAkPicmyD5bxE3 xUVTGGKvJUKH95XcOSIUERw3f/jk446yDnQiucTao+6sBx/3RB/P2GpSGvVRIb/nsl4z TPYw== X-Gm-Message-State: AKwxytchiXS8f/ryAxdr8BWUzBtIUAeQ1EdDogmw+vPSFiLB0dDJF3LK /eT0oH5dQEd+MX5VNP9uiY9xThbNyQArIIwRxjU= X-Received: by 10.237.38.5 with SMTP id z5mr25313597qtc.180.1516992204536; Fri, 26 Jan 2018 10:43:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.175.35 with HTTP; Fri, 26 Jan 2018 10:43:23 -0800 (PST) In-Reply-To: <783221ff-7366-5a50-f022-8b7b8a21e998@metafoo.de> References: <1515961960-35157-1-git-send-email-milan.o.stevanovic@gmail.com> <783221ff-7366-5a50-f022-8b7b8a21e998@metafoo.de> From: Andy Shevchenko Date: Fri, 26 Jan 2018 20:43:23 +0200 Message-ID: Subject: Re: [PATCH v3 1/2] iio: adc: driver for ti adc081s/adc101s/adc121s To: Lars-Peter Clausen Cc: Milan Stevanovic , Jonathan Cameron , Michael Hennerich , Linux Kernel Mailing List , Hartmut Knaack , Peter Meerwald , linux-iio@vger.kernel.org, Philippe Ombredanne Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 26, 2018 at 8:25 PM, Lars-Peter Clausen wrote: > On 01/26/2018 07:19 PM, Andy Shevchenko wrote: >> On Sun, Jan 14, 2018 at 10:32 PM, Milan Stevanovic >> wrote: >>> Add Linux device driver for TI single-channel CMOS >>> 8/10/12-bit analog-to-digital converter with a >>> high-speed serial interface. >>> >>> Signed-off-by: Milan Stevanovic >> >>> + * Analog Devices AD7466/7/8 AD7476/5/7/8 (A) SPI ADC driver >>> + * TI ADC081S/ADC101S/ADC121S 8/10/12-bit SPI ADC driver >> >> Guys, I'm not sure I understood this mix. > > You often have the case where two or even more vendors produce parts that > are (mostly) pin and register map compatible. This is typically to fulfill > the second source requirement that some customers have. > > It is not uncommon to see drivers that support parts from different vendors. Yep, though in this case we have, it seems, a counterpart (i2c variant) in drivers/iio/adc/ti-adc081c.c >> We have like few TI drivers here: >> >> drivers/iio/adc/ti-adc0832.c:352:module_spi_driver(adc0832_driver); >> drivers/iio/adc/ti-adc084s021.c:269:module_spi_driver(adc084s021_driver); >> drivers/iio/adc/ti-adc108s102.c:343:module_spi_driver(adc108s102_driver); >> drivers/iio/adc/ti-adc12138.c:547:module_spi_driver(adc12138_driver); >> drivers/iio/adc/ti-adc128s052.c:211:module_spi_driver(adc128_driver); >> drivers/iio/adc/ti-adc161s626.c:276:module_spi_driver(ti_adc_driver); >> drivers/iio/adc/ti-ads7950.c:519:module_spi_driver(ti_ads7950_driver); >> drivers/iio/adc/ti-ads8688.c:481:module_spi_driver(ads8688_driver); >> drivers/iio/adc/ti-tlc4541.c:266:module_spi_driver(tlc4541_driver); >> >> What's wrong with them? > > They are probably not register map compatible with those other drivers. (Or > nobody cared to check if they are register map compatible). I would believe in the latter than former. >> Is it here code duplication between two vendors? ...and instead of doing such mix I would really rather have a separate glue driver to the same code. -- With Best Regards, Andy Shevchenko