Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932482AbbGTIiv (ORCPT ); Mon, 20 Jul 2015 04:38:51 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:38012 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932440AbbGTIir (ORCPT ); Mon, 20 Jul 2015 04:38:47 -0400 Message-ID: <55ACB393.8000603@parkeon.com> Date: Mon, 20 Jul 2015 10:38:43 +0200 From: Martin Fuzzey User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Jonathan Cameron , Martin Kepplinger , knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, roberta.dobrescu@gmail.com, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org CC: devicetree@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, christoph.muellner@theobroma-systems.com, Martin Kepplinger Subject: Re: [PATCH 8/8] iio: mma8452: add devicetree property to allow all pin wirings References: <1436186062-5766-1-git-send-email-martink@posteo.de> <1436186062-5766-9-git-send-email-martink@posteo.de> <55ABAA8B.3080706@kernel.org> In-Reply-To: <55ABAA8B.3080706@kernel.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2688 Lines: 62 On 19/07/15 15:47, Jonathan Cameron wrote: > On 06/07/15 13:34, Martin Kepplinger wrote: >> For the devices supported by the mma8452 driver, two interrupt pins are >> available to route the interrupt signals to. By default INT1 is assumed. >> >> This adds a simple boolean DT property, for users to configure it for >> INT2, if that is the wired interrupt pin for them. >> >> This is important for everyone to be able to use this driver, no matter >> how their chip is wired. >> >> Since this doesn't change the default behaviour, it doesn't break anything >> for existing users. A remark about this. The hardware allows each of the interrupt sources (threshold, freefall, data available, wakeup, ...) to be individiually mapped to one of the two available interrupt pins. This patch only allows one pin or the other one to be selected for all the sources. Granted this will certainly cover 99% of use cases (even if both are wired that means we can use either). However there is one possible case not covered which is when one of the interrupt signals is connected to some other circuitry (alarm, power,...) in addition to being used as an interrupt to the CPU. Normally for code I'd just say let's cross that bridge when we come to it given that it's pretty unlikely. However since this affects the DT binding and they can be awkward to change while keeping compatibility maybe it would be better to use a bitmask DT property rather than a boolean to actually describe the full hardware capabilities and keep that door open? Of course, actually supporting arbitary mappings would be a bit more work in the driver (both irqs would need to requested...). However it would be possible to use a bitmask in the DT but, for the moment, only accept all zeros or all ones, leaving the rest for a future driver update if and when it is needed. I don't have a strong objection to doing it the current way, it's certainly the simplest way and it's likely to be all we ever need just pointing out a possible shortcoming. I think It would be good to have the DT maintainers view on this. >> Signed-off-by: Martin Kepplinger >> Signed-off-by: Christoph Muellner > The whole series looks good to me. Just want those acks from Peter and / or > Martin before I apply it. I'll try to give it a spin this week. Can't promise though Regards, Martin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/