Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753912AbbGGFZE (ORCPT ); Tue, 7 Jul 2015 01:25:04 -0400 Received: from mail-ig0-f179.google.com ([209.85.213.179]:35636 "EHLO mail-ig0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751362AbbGGFY4 (ORCPT ); Tue, 7 Jul 2015 01:24:56 -0400 MIME-Version: 1.0 In-Reply-To: <20150706113355.GA6967@leoy-linaro> References: <20150706113355.GA6967@leoy-linaro> Date: Tue, 7 Jul 2015 10:54:55 +0530 Message-ID: Subject: Re: Query: Clock driver requests mailbox channel From: Jassi Brar To: Leo Yan Cc: Russell King , Michael Turquette , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1194 Lines: 26 On Mon, Jul 6, 2015 at 5:03 PM, Leo Yan wrote: > Hi all, > > i'm working with one clock driver, which will invoke mailbox API to > request the mailbox channel and send message. > > Usually clock driver will init with devicetree, below is the example: > CLK_OF_DECLARE(hi6220_clk_power, "hisilicon,hi6220-clock-power", > hi6220_clk_power_init); > > Clock init function it will pass the pointer of struct device_node > but not the pointer of struct device. So finally it's difficult to > invoke mailbox API *mbox_request_channel()*, due it need use the > struct device to search DT's property "mboxes". > > I want to find which is the best way to resolve this issue, so do you > suggest clock driver to manually register one device? Or can we add > one more API to request the mailbox channel directly with device_node? > IIUC, such clocks (that require platform resources) should be populated from the platform_device's probe()? -- 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/