From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH 2/2] tpm: support driver-specific sysfs attrs in tpm_tis_core Date: Thu, 14 Jul 2016 21:23:27 -0600 Message-ID: <20160715032327.GF9347@obsidianresearch.com> References: <1468547496-16215-1-git-send-email-apronin@chromium.org> <1468547496-16215-3-git-send-email-apronin@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1468547496-16215-3-git-send-email-apronin-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Andrey Pronin Cc: dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, smbarber-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, groeck-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net On Thu, Jul 14, 2016 at 06:51:36PM -0700, Andrey Pronin wrote: > - WARN_ON(chip->groups_cnt != 0); Nope. > - const struct attribute_group *groups[3]; > + /* up to 4 attribute groups: > + * - driver-specific > + * - common TPM1.2 and TPM2.0 > + * - TPM1.2/2.0-specific > + * - ppi > + */ > + const struct attribute_group *groups[5]; The prior patch needed to have groups[4], every patch much work. > + if (priv->phy_ops->attr_group) > + chip->groups[chip->groups_cnt++] = priv->phy_ops->attr_group; I am really not excited about having driver specific sysfs files. What is the justification for this? Jason ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports.http://sdm.link/zohodev2dev