From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D332C4360C for ; Tue, 8 Oct 2019 11:53:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E07120679 for ; Tue, 8 Oct 2019 11:53:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730786AbfJHLxm (ORCPT ); Tue, 8 Oct 2019 07:53:42 -0400 Received: from 2.mo69.mail-out.ovh.net ([178.33.251.80]:59896 "EHLO 2.mo69.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729790AbfJHLxm (ORCPT ); Tue, 8 Oct 2019 07:53:42 -0400 X-Greylist: delayed 541 seconds by postgrey-1.27 at vger.kernel.org; Tue, 08 Oct 2019 07:53:41 EDT Received: from player168.ha.ovh.net (unknown [10.108.42.82]) by mo69.mail-out.ovh.net (Postfix) with ESMTP id E622A69E08 for ; Tue, 8 Oct 2019 13:35:24 +0200 (CEST) Received: from etezian.org (85-76-98-218-nat.elisa-mobile.fi [85.76.98.218]) (Authenticated sender: andi@etezian.org) by player168.ha.ovh.net (Postfix) with ESMTPSA id C8BA2A9AD333; Tue, 8 Oct 2019 11:35:13 +0000 (UTC) Date: Tue, 8 Oct 2019 14:35:11 +0300 From: Andi Shyti To: Stephan Gerhold Cc: Dmitry Torokhov , Andi Shyti , Simon Shields , linux-input@vger.kernel.org, Rob Herring , Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] Input: mms114 - add support for mms345l Message-ID: <20191008113511.GA4015@jack.zhora.eu> References: <20191007203343.101466-1-stephan@gerhold.net> <20191007205021.104402-1-stephan@gerhold.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191007205021.104402-1-stephan@gerhold.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Ovh-Tracer-Id: 8393583808645546733 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrheelgdegfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stephan, On Mon, Oct 07, 2019 at 10:50:21PM +0200, Stephan Gerhold wrote: > MMS345L is another first generation touch screen from Melfas, > which uses the same registers as MMS152. > > However, using I2C_M_NOSTART for it causes errors when reading: > > i2c i2c-0: sendbytes: NAK bailout. > mms114 0-0048: __mms114_read_reg: i2c transfer failed (-5) > > The driver works fine as soon as I2C_M_NOSTART is removed. > > Add a separate melfas,mms345l binding, and make use of I2C_M_NOSTART > only for MMS114 and MMS152. > > Signed-off-by: Stephan Gerhold Reviewed-by: Andi Shyti just a nitpick in case you will resend it (but you don't need to). > - if (!i2c_check_functionality(client->adapter, > - I2C_FUNC_PROTOCOL_MANGLING)) { > + type = (enum mms_type)device_get_match_data(&client->dev); you don't need any cast here. Thanks, Andi