Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753611AbdF2PIR (ORCPT ); Thu, 29 Jun 2017 11:08:17 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:48352 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753570AbdF2PII (ORCPT ); Thu, 29 Jun 2017 11:08:08 -0400 Date: Thu, 29 Jun 2017 08:08:00 -0700 From: Guenter Roeck To: Mike Looijmans Cc: Lars-Peter Clausen , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, jdelvare@suse.com, "linux-iio@vger.kernel.org" , Jonathan Cameron Subject: Re: [PATCH v2] hwmon: Add LTC2471/LTC2473 driver Message-ID: <20170629150800.GB10226@roeck-us.net> References: <1498733135-4729-1-git-send-email-mike.looijmans@topic.nl> <1498738434-18252-1-git-send-email-mike.looijmans@topic.nl> <26126017-55d8-3d38-f5de-c764ca9ec699@topic.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <26126017-55d8-3d38-f5de-c764ca9ec699@topic.nl> User-Agent: Mutt/1.5.24 (2015-08-30) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1470 Lines: 33 On Thu, Jun 29, 2017 at 04:11:42PM +0200, Mike Looijmans wrote: > On 29-06-17 15:40, Guenter Roeck wrote: > >On 06/29/2017 05:30 AM, Lars-Peter Clausen wrote: > >>On 06/29/2017 02:13 PM, Mike Looijmans wrote: > >>>The LTC2741 and LTC2473 are single voltage monitoring chips. The LTC2473 > >>>is similar to the LTC2471 but outputs a signed differential value. > >>> > >>>Datasheet: > >>> http://cds.linear.com/docs/en/datasheet/24713fb.pdf > >> > >>This looks more like a general purpose ADC rather than a specialized voltage > >>monitoring chip. In my opinion this driver would be better suited for the > >>IIO framework. But before you start working on that lets try to hear what > >>others think about this. > >> > > > >Agreed (I just replied to that on another thread). > > Took a peek at the IIO drivers, looks simple enough, so I suggest to drop > this patch and I'll create an IIO driver instead. > > The ltc2485 (as suggested by Guenter on that other thread) is pretty similar > indeed, it might be feasible to join the two and have one driver handle them > both. That would be preferred over a separat driver, right? > In general yes, but it really depends on the similarities and differences. If the single driver ends up twice as large, it is probably better to keep them separate. If all you need to do is to add chip IDs, obviously a single driver is better. Everything in between really depends on the amount of chip specific code. Thanks, Guenter