From patchwork Sun Sep 11 16:43:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 9325481 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2E6B6607D3 for ; Sun, 11 Sep 2016 16:44:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0968228B35 for ; Sun, 11 Sep 2016 16:44:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA39B28B37; Sun, 11 Sep 2016 16:44:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8C3E28B35 for ; Sun, 11 Sep 2016 16:44:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756020AbcIKQn2 (ORCPT ); Sun, 11 Sep 2016 12:43:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42264 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755666AbcIKQn1 (ORCPT ); Sun, 11 Sep 2016 12:43:27 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1C4814DAF7; Sun, 11 Sep 2016 16:43:26 +0000 (UTC) Received: from shalem.localdomain.com (vpn1-7-11.ams2.redhat.com [10.36.7.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8BGhNA6029509; Sun, 11 Sep 2016 12:43:23 -0400 From: Hans de Goede To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree , Hans de Goede , "Dr . H . Nikolaus Schaller" Subject: [PATCH] Revert "Input: bma150 - extend chip detection for bma180" Date: Sun, 11 Sep 2016 18:43:21 +0200 Message-Id: <20160911164321.23122-1-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sun, 11 Sep 2016 16:43:26 +0000 (UTC) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit ef3714fdbc8d ("Input: bma150 - extend chip detection for bma180"). The bma180 is not compatible with the bma150 at all, it has 14 bits resolution instead of 10, and it has quite different control registers. Treating the bma180 as a bma150 wrt its data registers will just result in throwing away the lowest 4 bits, which is not too bad. But the ctrl registers are a different story. It may be that things happen to just work (I don't have a bma180 to test with) but that certainly does not make this right. Removing the bma180 id also removes overlap wrt the ids in the iio bma180 driver which does treat the bma180 properly. Cc: Dr. H. Nikolaus Schaller Signed-off-by: Hans de Goede --- drivers/input/misc/bma150.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/misc/bma150.c b/drivers/input/misc/bma150.c index b0d4453..cae4832 100644 --- a/drivers/input/misc/bma150.c +++ b/drivers/input/misc/bma150.c @@ -70,7 +70,6 @@ #define BMA150_CFG_5_REG 0x11 #define BMA150_CHIP_ID 2 -#define BMA180_CHIP_ID 3 #define BMA150_CHIP_ID_REG BMA150_DATA_0_REG #define BMA150_ACC_X_LSB_REG BMA150_DATA_2_REG @@ -539,7 +538,7 @@ static int bma150_probe(struct i2c_client *client, } chip_id = i2c_smbus_read_byte_data(client, BMA150_CHIP_ID_REG); - if (chip_id != BMA150_CHIP_ID && chip_id != BMA180_CHIP_ID) { + if (chip_id != BMA150_CHIP_ID) { dev_err(&client->dev, "BMA150 chip id error: %d\n", chip_id); return -EINVAL; } @@ -643,7 +642,6 @@ static UNIVERSAL_DEV_PM_OPS(bma150_pm, bma150_suspend, bma150_resume, NULL); static const struct i2c_device_id bma150_id[] = { { "bma150", 0 }, - { "bma180", 0 }, { "smb380", 0 }, { "bma023", 0 }, { }