From patchwork Wed Apr 29 10:58:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 6295031 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E676FBEEE5 for ; Wed, 29 Apr 2015 10:59:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2169A20131 for ; Wed, 29 Apr 2015 10:59:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 42A132013D for ; Wed, 29 Apr 2015 10:59:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422906AbbD2K7T (ORCPT ); Wed, 29 Apr 2015 06:59:19 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:33791 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422888AbbD2K7P (ORCPT ); Wed, 29 Apr 2015 06:59:15 -0400 Received: by pdbnk13 with SMTP id nk13so25130864pdb.0; Wed, 29 Apr 2015 03:59:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=soONpJxsmaT6YE5vpD7yRvxM9SE5tV24ovE1KloBgmE=; b=EwcODe/wZN46NqdGunUbWK2kLlRGBGfMc/cBKHuHPhKi3czWKluOltSwpfkKIeZsAY ZaiOR2JbaO3ga13yzKGtMMvUyZbf+3CkMeL0NFeeIEO5aw4yoEuVXiYQm118hzCkyXAz 2Q5xTVmaKtSVwS1xaB8FFYEeuu+s3Z9C2b5o2iWh6XRfs0ryS5rsXv+J6GwCFCaeWtwd VsvOxiIRIFmwQ1u0PuyIVRFilz8MWnGikqqgULDpye+tmL0MUhJ7Z6Cyr4SSEYAv8zMZ nZgMbwRIGW4CnN78FdTD7MQrLrNwBZEvATsoc52frNyseVcFsD1m/3cwqbJaRrH7xCk4 YB6g== X-Received: by 10.70.135.168 with SMTP id pt8mr40929129pdb.8.1430305155333; Wed, 29 Apr 2015 03:59:15 -0700 (PDT) Received: from localhost.localdomain ([125.130.175.98]) by mx.google.com with ESMTPSA id kr9sm25253231pab.30.2015.04.29.03.59.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Apr 2015 03:59:14 -0700 (PDT) From: Krzysztof Kozlowski To: Chanwoo Choi , MyungJoo Ham , Dmitry Torokhov , Samuel Ortiz , Lee Jones , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-pm@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 02/10] mfd: max77693: Store I2C device type as enum and add default unknown Date: Wed, 29 Apr 2015 19:58:27 +0900 Message-Id: <1430305114-23598-3-git-send-email-k.kozlowski.k@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1430305114-23598-1-git-send-email-k.kozlowski.k@gmail.com> References: <1430305114-23598-1-git-send-email-k.kozlowski.k@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Store the device type (obtained from i2c_device_id) as an enum and add a default type of unknown to distinguish from case when this is not set at all. Signed-off-by: Krzysztof Kozlowski --- include/linux/mfd/max77693-private.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h index ad67b8235a8d..e3c0afff38d3 100644 --- a/include/linux/mfd/max77693-private.h +++ b/include/linux/mfd/max77693-private.h @@ -529,13 +529,18 @@ enum max77693_irq_muic { MAX77693_MUIC_IRQ_NR, }; +enum max77693_types { + TYPE_MAX77693_UNKNOWN, + TYPE_MAX77693, +}; + struct max77693_dev { struct device *dev; struct i2c_client *i2c; /* 0xCC , PMIC, Charger, Flash LED */ struct i2c_client *muic; /* 0x4A , MUIC */ struct i2c_client *haptic; /* 0x90 , Haptic */ - int type; + enum max77693_types type; struct regmap *regmap; struct regmap *regmap_muic; @@ -549,8 +554,4 @@ struct max77693_dev { int irq; }; -enum max77693_types { - TYPE_MAX77693, -}; - #endif /* __LINUX_MFD_MAX77693_PRIV_H */