From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH 1/3] SLIMbus: Device management on SLIMbus Date: Mon, 15 Jun 2015 11:54:24 +0100 Message-ID: <20150615105424.GJ18309@sirena.org.uk> References: <1434260958-13732-1-git-send-email-sdharia@codeaurora.org> <1434260958-13732-2-git-send-email-sdharia@codeaurora.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Xssso5lpTBgMxDfe" Return-path: Received: from mezzanine.sirena.org.uk ([106.187.55.193]:58278 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753810AbbFOKzV (ORCPT ); Mon, 15 Jun 2015 06:55:21 -0400 Content-Disposition: inline In-Reply-To: <1434260958-13732-2-git-send-email-sdharia@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Sagar Dharia Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, bp@suse.de, poeschel@lemonage.de, santosh.shilimkar@ti.com, treding@nvidia.com, gong.chen@linux.intel.com, andreas.noever@gmail.com, alan@linux.intel.com, mathieu.poirier@linaro.org, daniel@ffwll.ch, oded.gabbay@amd.com, jkosina@suse.cz, sharon.dvir1@mail.huji.ac.il, joe@perches.com, davem@davemloft.net, james.hogan@imgtec.com, michael.opdenacker@free-electrons.com, daniel.thompson@linaro.org, nkaje@codeaurora.org, mbutler@audience.com, kheitke@audience.com, mlocke@codeaurora.org, agross@codeaurora.org, linux-arm-msm@vger.kernel.org --Xssso5lpTBgMxDfe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Jun 13, 2015 at 11:49:16PM -0600, Sagar Dharia wrote: > +static int slim_compare_eaddr(struct slim_eaddr *a, struct slim_eaddr *b) > +{ > + if (a->manf_id == b->manf_id && a->prod_code == b->prod_code && > + a->dev_index == b->dev_index && > + a->instance == b->instance) > + return 0; > + return -EIO; > +} -EIO? That seems a bit random. > +static int slim_pm_resume(struct device *dev) > +{ > + const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; > + > + if (pm) > + return pm_generic_resume(dev); > + else > + return 0; > +} I'm really surprised this needs to be open coded, none of this references anything Slimbus specific. Why not fix the need for open coding? There's also a bunch of other ops like poweroff and freeze/thaw that you're not doing anything with. > +void slim_ctrl_add_boarddevs(struct slim_controller *ctrl) > +{ Why are these operations split? > + * @reset_device: This callback is called after framer is booted. > + * Driver should do the needful to reset the device, > + * so that device acquires sync and be operational. boot_device or init_device perhaps? Reset sounds like it takes a running device and resets it. --Xssso5lpTBgMxDfe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVfq7fAAoJECTWi3JdVIfQpcYH/j8TX+KYqqFEYgWRr6YA8Oeq fYFS2v56fTMTg7y8O5br6AIYkgTE2vXvRqFGttY55SEiIunmmyjBPizgPEk70lLM SL9bwagr+tww90xc4W3hrPiG9hTxe66zSnRsG0f2j3zYg3jbJWXmo28XpbhYf1qX 6BuaT/pezV7ST7KnU/bPs4URl+R1+CVo9pnvTYaZnrnzyURsRM9BtdEC+/OHrIrC 3NODTW/OMWjbNRGyQz2MWlF1d6O2+QOemzbohmnkCi5/jEfoRWgYdoVFeYlmRb/q 0+k8gL1n08n4/AgrGr74bfSmQv7SrkVuHufB6RDbpqltBGW54OEmETxq2BHRx3U= =tZwF -----END PGP SIGNATURE----- --Xssso5lpTBgMxDfe--