Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp171228ybl; Wed, 22 Jan 2020 18:40:53 -0800 (PST) X-Google-Smtp-Source: APXvYqxHryBb8EAfXyKWCZPskQNWgFo+N0K1Sl3ge0tJMHLL02iYKzBaplsLvgk6FDYhtjXPgAUc X-Received: by 2002:aca:1b01:: with SMTP id b1mr8632438oib.6.1579747253841; Wed, 22 Jan 2020 18:40:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579747253; cv=none; d=google.com; s=arc-20160816; b=fdF1Maqx/GeKRfQi1xI+BZSMSCMBQdmhhPLyH7qvk27dsQNsgwv2iZzF+ziFkf4nx4 4IpUgnHkJndRA3M7QWJm5jhwEjyavnDrUUdOg6J0xeZ1qu0rIT/O7wbwIDDQF5BkqOZb rZtwSAECcgfJooDucB2QKOzLi6W8kCnD2TaPeFSHxsrbFD45hpfK1/1a3QufHyIFPP57 6Hca8h5PZIT4WGT5e/JdVJaFZy8y6kon0HzqQF2yk1f1BmkjBJtkfzqynsrlyO1M4Lll BEdqtwsd3GEa0l6wlALdcYqjpra1Yoq+W/Q8pzyJU5tALOakOE8N9e8EZkOEg5ryCHLu 60/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bTqNrmZc4XwB7mbH5XKk8hIXReWiy2o/x14mzISIa8Y=; b=kZvCPtV7jlP68ahpdQrLwETLFrLdc8MfBplNUZ7wUy4ua0savrqWxsfmWpqpLQysVs rnS+reNxPPhnwL9rd1ddV6vMf7/rSgQB4HDMwN5iYwBzb3vamF5dpIW+y94irC8RxHZp LonMQyHO9Q3B84TSaUhWCMbwELd9JqEIpJDC79BWBIdECBzvYb8pqMBe5BWJpW+MrD/t NmpRNBPHToMSBUZenkgFNAhVSbi3W38DhO62Fcf1292v+1VQM5vWn9v//nPzx14SauUy gAp+Q+6FSpU2vU52bTplhXELcMlq4s8WQSUCL3i1Flwr/RBjkX1yzuQ7vsURea9Eout2 CVgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=byikFvWW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m20si369728otq.35.2020.01.22.18.40.39; Wed, 22 Jan 2020 18:40:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=byikFvWW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726061AbgAWCj2 (ORCPT + 99 others); Wed, 22 Jan 2020 21:39:28 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38281 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbgAWCj2 (ORCPT ); Wed, 22 Jan 2020 21:39:28 -0500 Received: by mail-pl1-f196.google.com with SMTP id t6so680088plj.5 for ; Wed, 22 Jan 2020 18:39:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bTqNrmZc4XwB7mbH5XKk8hIXReWiy2o/x14mzISIa8Y=; b=byikFvWWlkqO1f5z4PSmmOvGSP4X745Zi5Zxzm8EBh0qZ8UWn56+B0yzEt6K61kzgH UIH4OHaJLtDSr4LI+pVWG+YieX7Ut4IOOluIanj5iVpOVFuSMZjaB2ma+d15j1F5z671 LH3wlYrHF15Xms+98W2VTz1Q68Lk1JKy3zffRSylF7hbM1lQGXsrNljDC7N/y8OwPr8L 1pXPyvW9a+MC72GbEGM1+4t45D36jbtqH1BA195w/YehECEagnR8xW4NbY8HOGsp2jgF x2VyyxV7PoqCGSv4p6vcZGJ1Pyat9mZznroY9sX+kV3dv0/aqNm9j3DPzxic1emFqhPv 05/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bTqNrmZc4XwB7mbH5XKk8hIXReWiy2o/x14mzISIa8Y=; b=Rpote3q1Ir5L62dqXE9RyVwEnXOz/6v/qdKPCASRDPiYnb18I6JUDuwdAqml9lXfqD wZkOVGB5cJAh2zczBvZgBeBSlwv2FlUuXQBfo9yiu+qNtYYl9xawMLuzW7fb+emNMbHP eogZsVbs0dbLbn/aOyhWZj/H9lPDxY9bEnRijvcOYk68YUDJBIbAeAhtucDAKhyLr0Ey Uwtwm2sp7P23ySCq0KjF0br9dLvHgkWQ+Gw23BHGc80V50l5qyDzmvuyFFG+D1XZsInj stnroW05GW507iLz8xH4Rfb3kdfrOA5SYYpRMzrqSbvuSzKgijn0RYSIt59nGdAOxXWn zU8A== X-Gm-Message-State: APjAAAVFpacNnZZHxuFAGyC6odAAVNmHw3H80Y6RrzcL4CilE45iUaLE 7ClIYFL5WLEeUckxXNZPjONY0Q== X-Received: by 2002:a17:90a:c301:: with SMTP id g1mr1870273pjt.88.1579747167904; Wed, 22 Jan 2020 18:39:27 -0800 (PST) Received: from localhost ([122.167.18.14]) by smtp.gmail.com with ESMTPSA id w11sm386820pgs.60.2020.01.22.18.39.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jan 2020 18:39:26 -0800 (PST) Date: Thu, 23 Jan 2020 08:09:24 +0530 From: Viresh Kumar To: Cristian Marussi Cc: arnd@arndb.de, Sudeep Holla , jassisinghbrar@gmail.com, peng.fan@nxp.com, peter.hilber@opensynergy.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V3] firmware: arm_scmi: Make scmi core independent of the transport type Message-ID: <20200123023924.roqc2iyx4wmukk4p@vireshk-i7> References: <4b74f1b6c1f9653241a1b5754525e230b3d76a3f.1579595093.git.viresh.kumar@linaro.org> <3a8836dd-99d3-faff-af05-2032d609f594@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a8836dd-99d3-faff-af05-2032d609f594@arm.com> User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22-01-20, 12:44, Cristian Marussi wrote: > On 21/01/2020 08:27, Viresh Kumar wrote: > commment is obsolete Right, they need to be checked everywhere again. Sorry for missing that earlier. > > +struct scmi_chan_info { > > + struct scmi_info *info; > > + struct device *dev; > > + struct scmi_handle *handle; > > + void *transport_info; > > +}; > > + > > +/** > > + * struct scmi_transport_ops - Structure representing a SCMI transport ops > > + * > > + * @send_message: Callback to send a message > > + * @mark_txdone: Callback to mark tx as done > > + * @chan_setup: Callback to allocate and setup a channel > > + * @chan_free: Callback to free a channel > > + */ > commment is obsolete but I would also ask: are all of these operations supposed to be mandatory supported > on any possible foreseeable transport ? (beside the obviously needed like send_message) > > I'm asking because they are all called straight away from the driver core without any NULL check > so that if a new transport should not need one of them it will be forced to anyway implement a dummy one > to comply, which it will be needlessly invoked every time. They are kept as mandatory for now as we don't really know how it will look for other transport types. Lets make them optional only when someone don't need to define them. It would be a simple change anyway. > > /* Each compatible listed below must have descriptor associated with it */ > > static const struct of_device_id scmi_of_match[] = { > > - { .compatible = "arm,scmi", .data = &scmi_generic_desc }, > > + { .compatible = "arm,scmi", .data = &scmi_mailbox_desc }, > > { /* Sentinel */ }, > > }; > > minor thing: shouldn't the chosen transport being configurable at compile time with some > option like CONFIG_SCMI_TRANSPORT_MBOX ? or via DT ? It is configurable via DT. The compatible should look different in that case, something like: "arm,scmi-". -- viresh