public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Olech <tony.olech@elandigitalsystems.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Chris Ball <cjb@laptop.org>, linux-mmc@vger.kernel.org
Subject: Re: [PATCH] mmc: USB SDIO/SD/MMC Host Controller (VUB300) driver Re-Resubmission
Date: Tue, 19 Apr 2011 10:05:52 +0100	[thread overview]
Message-ID: <1303203952.1622.19.camel@apple-mac> (raw)
In-Reply-To: <201103151723.32942.arnd@arndb.de>

On Tue, 2011-03-15 at 17:23 +0100, Arnd Bergmann wrote:
> On Thursday 10 March 2011, Tony Olech wrote:
...
> > +static ssize_t __show_operating_mode(struct vub300_mmc_host *vub300,
> > +                                   struct mmc_host *mmc, char *buf)
> > +{
> > +       int usb_packet_size = vub300->large_usb_packets ? 512 : 64;
> > +       if (vub300->vub_name[0])
> > +               return sprintf(buf, "VUB %s %s %d MHz %s %d byte USB packets"
> > +                               " using %s\n",
> > +                      (mmc->caps & MMC_CAP_SDIO_IRQ) ? "IRQs" : "POLL",
> > +                      (mmc->caps & MMC_CAP_4_BIT_DATA) ? "4-bit" : "1-bit",
> > +                      mmc->f_max / 1000000,
> > +                      pad_input_to_usb_pkt ? "padding input data to" : "with",
> > +                      usb_packet_size, vub300->vub_name);
> > +       else
> > +               return sprintf(buf, "VUB %s %s %d MHz %s %d byte USB packets"
> > +                               " and no offload processing\n",
> > +                      (mmc->caps & MMC_CAP_SDIO_IRQ) ? "IRQs" : "POLL",
> > +                      (mmc->caps & MMC_CAP_4_BIT_DATA) ? "4-bit" : "1-bit",
> > +                      mmc->f_max / 1000000,
> > +                      pad_input_to_usb_pkt ? "padding input data to" : "with",
> > +                      usb_packet_size);
> > +}
> > +
> > +static ssize_t show_operating_mode(struct device *dev,
> > +                                 struct device_attribute *attr, char *buf)
> > +{
> > +       struct mmc_host *mmc = container_of(dev, struct mmc_host, class_dev);
> > +       if (mmc) {
> > +               struct vub300_mmc_host *vub300 = mmc_priv(mmc);
> > +               return __show_operating_mode(vub300, mmc, buf);
> > +       } else {
> > +               return sprintf(buf, "VUB driver has no attached device");
> > +       }
> > +}
> 
> This sysfs attribute is rather hard to parse from user space, it looks
> like it's designed only to be read by humans. I think it would be better
> to use multiple attributes, each of which has only a single piece
> of information in it.
> 
> Some of these attributes however don't really belong into this driver
> but into the core, like the 1-bit / 4-bit mode. Please leave this out
> of your driver, and submit a separate patch to the mmc core if you
> think it's reasonable.

The purpose of this read-only interface is for VUB300 support
staff to obtain information from our customers. Our customers
are not like the people on this list. If you have ever tried
to do telephone support you would appreciate the difficulty
of getting a non-technical person to first of all find the
log files and then to extract the correct lines. It therefore
follows that if the 1 or 4 bit mode is useful info for the 
VUB300 support staff, then this read-only interface is the
appropriate single place for it to be provided. The overhead
of providing such an interface is negligible and the existance
of such an interface demonstrates that linux is no longer
designed only for geeks.

Tony Olech





  parent reply	other threads:[~2011-04-19  9:06 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20B0EAA71DD7413A9A29D0493C6C1D87@AN00536>
     [not found] ` <20101116150022.GA27726@void.printf.net>
     [not found]   ` <27884BED0E3C489C8849EE12A803F536@AN00536>
     [not found]     ` <m3oc9pnt6g.fsf@pullcord.laptop.org>
     [not found]       ` <4CE41BE3.1060806@elandigitalsystems.com>
     [not found]         ` <m3oc9n241c.fsf@pullcord.laptop.org>
2010-11-22 15:05           ` [PATCH] mmc: USB SDIO/SD/MMC Host Controller (VUB300) driver Tony Olech
2010-11-30  6:15             ` Chris Ball
2010-11-30 12:23               ` David Vrabel
2010-12-17  0:43                 ` Chris Ball
2010-12-21 15:03                 ` Tony Olech
2011-01-06  4:56                   ` Chris Ball
2011-01-06 13:18                     ` David Vrabel
2011-01-06 13:17             ` David Vrabel
2011-01-20 16:09               ` Tony Olech
2011-01-20 16:11               ` Tony Olech
2011-01-21 10:50             ` [PATCH] mmc: USB SDIO/SD/MMC Host Controller (VUB300) driver Resubmission Tony Olech
2011-01-21 21:14               ` Nicolas Pitre
2011-01-22 14:21                 ` Wolfram Sang
2011-01-22 19:07                   ` Nicolas Pitre
2011-01-23 10:09                     ` Wolfram Sang
2011-01-23 14:01                       ` Nicolas Pitre
2011-01-24 15:35                         ` Wolfram Sang
2011-01-24 16:27                         ` Tony Olech
2011-01-24 16:21                       ` Tony Olech
2011-01-25  9:13                         ` Wolfram Sang
2011-01-25  9:35                           ` Tony Olech
2011-01-25 20:40                             ` Nicolas Pitre
2011-01-24 16:17                     ` Tony Olech
2011-01-24  8:49                 ` Tony Olech
2011-01-24 14:43                   ` Nicolas Pitre
2011-01-24 15:10                     ` Tony Olech
2011-01-24 15:55                       ` Nicolas Pitre
2011-01-24 16:08                         ` Tony Olech
2011-01-24 16:28                           ` Nicolas Pitre
2011-01-24 16:43                             ` Tony Olech
2011-03-10 16:13               ` [PATCH] mmc: USB SDIO/SD/MMC Host Controller (VUB300) driver Re-Resubmission Tony Olech
2011-03-15  3:01                 ` Chris Ball
2011-03-15  9:40                   ` Wolfram Sang
2011-03-15 15:06                     ` Chris Ball
2011-03-15 15:41                       ` Arnd Bergmann
2011-03-15 16:23                 ` Arnd Bergmann
2011-03-15 16:55                   ` Tony Olech
2011-04-19  9:05                   ` Tony Olech [this message]
2011-04-19 12:10                     ` Arnd Bergmann
2011-04-19 12:32                       ` Tony Olech
2011-04-19 13:21                         ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1303203952.1622.19.camel@apple-mac \
    --to=tony.olech@elandigitalsystems.com \
    --cc=arnd@arndb.de \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox