Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966143AbbFJPvd (ORCPT ); Wed, 10 Jun 2015 11:51:33 -0400 Received: from mga14.intel.com ([192.55.52.115]:57549 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966095AbbFJPvY convert rfc822-to-8bit (ORCPT ); Wed, 10 Jun 2015 11:51:24 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,588,1427785200"; d="scan'208";a="740893835" From: "Yang, Fei" To: "Zha, Qipeng" , Mark Brown , "Pan, Jacob jun" , "Ortiz, Samuel" CC: "linux-kernel@vger.kernel.org" , "Zhong, Huiquan" , "Chen, Jason CJ" , "Zheng, Qi" Subject: RE: [PATCH] regmap: add virtual PMIC IPC bus support Thread-Topic: [PATCH] regmap: add virtual PMIC IPC bus support Thread-Index: AQHQe3+/Jgx/xoYcK0Ow1OcZtR3wtp2Bi7ng//+wpYCAAanGkP//9f+AgAFayWCAIfGv4A== Date: Wed, 10 Jun 2015 15:51:06 +0000 Message-ID: <02E7334B1630744CBDC55DA85862258349310BBD@ORSMSX102.amr.corp.intel.com> References: <1429573138-68002-1-git-send-email-qipeng.zha@intel.com> <20150518112109.GZ2761@sirena.org.uk> <20150519120915.GJ2761@sirena.org.uk> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1523 Lines: 23 > > >Why is this being added to the regmap core rather than being > > >implemented in using the reg_write() and reg_read() callbacks in the > > >core driver for the PMIC? > > Thanks. I don't receive this message before in eamil. > > Current regmap only support register access using several bus: i2c, spi, ac97 ... > > But register access for intel pmic are done by hardware ipc, so we add > > such support in regmap core, To make pmic subdevice drivers can use generic regmap r/w API to access registers. > That doesn't really address my concern - we already have the reg_read() and reg_write() interface so devices can use > regmap without a bus in the core. The question is if this is something that's going to be used by many devices so there's > code to share or if it's something that's only going to be used by this PMIC in which case keeping it in the driver should be easier. The IPC code is actually independent of PMIC, it will evolve together with the PMC firmware instead of PMIC. Maintaining the IPC code inside a PMIC driver would be weird because PMIC doesn't really know/care anything about IPC. In other words, the same PMIC driver could run on different platforms with either i2c or IPC access without knowing which mechanism is running underneath. -- 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/