From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946889AbdDYLYE (ORCPT ); Tue, 25 Apr 2017 07:24:04 -0400 Received: from mga07.intel.com ([134.134.136.100]:46895 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946697AbdDYLX6 (ORCPT ); Tue, 25 Apr 2017 07:23:58 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,249,1488873600"; d="scan'208";a="960826200" Message-ID: <1493119428.24567.190.camel@linux.intel.com> Subject: Re: [PATCH] iio: adc: Add support for TI ADC1x8s102 From: Andy Shevchenko To: Jan Kiszka , Peter Meerwald-Stadler , Mika Westerberg Cc: Jonathan Cameron , linux-iio@vger.kernel.org, Linux Kernel Mailing List , Sascha Weisenberger Date: Tue, 25 Apr 2017 14:23:48 +0300 In-Reply-To: References: <6e0f0b52-27a1-0ce5-c217-3aa941babe63@siemens.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2017-04-25 at 11:32 +0200, Jan Kiszka wrote: > On 2017-04-25 09:31, Peter Meerwald-Stadler wrote: +Cc: Mika. > > I think board-specific stuff should not go into the driver -> DT? > > Unfortunately, we only have half-baked ACPI on those boards. That's the main problem and still no excuse for uglifying code. > > > + > > > +#include > > > > who needs platform data these days :) > > Apparently, quite a few devices. New drivers are not supposed to use platform data. > But the situation here is: > - Existing hardware has incomplete ACPI description that needs to be >   augmented by software. Yes, and this software is called DSDT table in BIOS. Linux kernel has a support for properly formed table already for few releases. > - I'm not aware of a complete DT specification for this device. If >   there is any somewhere, I can happily include it. Looking to proposed code there is only one property for it, if there is an existing binding for the same property you may just simple re-use it. > > > + > > > +#define ADC1x8S102_GALILEO2_CS 8 > > > > this board-specific detail shouldn't be here > > Where should it go then? Obviously in (properly formed) ACPI. > no board specific stuff here please > > Needed to make it work. If there is a better file to keep that, I'll > move it. Ideally you need BIOS fixed for that. Otherwise you may do a separate code which would provide CS GPIO look up table. Mika, what do you think about fixing this in the C code for existing devices? -- Andy Shevchenko Intel Finland Oy