From mboxrd@z Thu Jan 1 00:00:00 1970 From: houlong wei Subject: Re: [PATCH v12 11/12] soc: mediatek: cmdq: add cmdq_dev_get_client_reg function Date: Tue, 20 Aug 2019 01:24:40 +0800 Message-ID: <1566235480.24117.13.camel@mhfsdcap03> References: <20190819025359.11381-1-bibby.hsieh@mediatek.com> <20190819025359.11381-12-bibby.hsieh@mediatek.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190819025359.11381-12-bibby.hsieh@mediatek.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Bibby Hsieh Cc: "devicetree@vger.kernel.org" , Nicolas Boichat , Philipp Zabel , srv_heupstream , Daoyuan Huang =?UTF-8?Q?=28=E9=BB=83=E9=81=93=E5=8E=9F=29?= , Sascha Hauer , Jassi Brar , "linux-kernel@vger.kernel.org" , Daniel Kurtz , YT Shen =?UTF-8?Q?=28=E6=B2=88=E5=B2=B3=E9=9C=86=29?= , CK Hu =?UTF-8?Q?=28=E8=83=A1=E4=BF=8A=E5=85=89=29?= , Rob Herring , "linux-mediatek@lists.infradead.org" , Ginny Chen =?UTF-8?Q?=28=E9=99=B3=E6=B2=BB=E5=82=91=29?= , Sascha Hauer , houlon.wei@mediatek.comMatthias Brugger List-Id: devicetree@vger.kernel.org On Mon, 2019-08-19 at 10:53 +0800, Bibby Hsieh wrote: > GCE cannot know the register base address, this function > can help cmdq client to get the cmdq_client_reg structure. > > Signed-off-by: Bibby Hsieh > --- > drivers/soc/mediatek/mtk-cmdq-helper.c | 29 ++++++++++++++++++++++++++ > include/linux/soc/mediatek/mtk-cmdq.h | 21 +++++++++++++++++++ > 2 files changed, 50 insertions(+) > [...] > > +/** > + * cmdq_dev_get_client_reg() - parse cmdq client reg from the device > + * node of CMDQ client > + * @dev: device of CMDQ mailbox clienti 'clienti' looks like a typo, 'client'? > + * @client_reg: CMDQ client reg pointer > + * @idx: the index of desired reg > + * > + * Return: 0 for success; else the error code is returned > + * > + * Help CMDQ client pasing the cmdq client reg 'pasing' looks like a typo, 'parsing'? > + * from the device node of CMDQ client. > + */ > +int cmdq_dev_get_client_reg(struct device *dev, > + struct cmdq_client_reg *client_reg, int idx); > + > /** > * cmdq_mbox_create() - create CMDQ mailbox client and channel > * @dev: device of CMDQ mailbox client