All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Marek Belisko <marek.belisko@open-nandra.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: adding hmc5883 driver
Date: Wed, 18 Apr 2012 09:45:50 +0100	[thread overview]
Message-ID: <4F8E7F3E.5080406@kernel.org> (raw)
In-Reply-To: <CAAfyv35jTq6eSM4gEarUiZQRQy0pOBKev-LzohvQe40k2TuXMQ@mail.gmail.com>

On 4/17/2012 9:51 PM, Marek Belisko wrote:
> Hi,
>
> I'm owner gta04 board which have hmc5883 compass.
> I'm currently using hmc5843 iio staging driver with some hacks
> (difference is only
> for range and rate values) which is working fine. I would like ask for
> opinion how to properly
> add new device.
>
> IMO options are:
> 1. add hmc5883 to DEVICE_TABLE with some flags and then use proper values for
> one or another device (possibly rename driver to hmc58x3)
Don't rename the driver.  Convention is the driver is named after the 
first device it supports.
Nothing stops it supporting lots more.  See the adc/max1363 for a big 
example.
Wild card naming goes horribly wrong from time to time as marketting 
departments like
to name their products in illogical ways.

Otherwise, this is probably the best option given they sound pretty similar.
>
> 2. separate common functions from existing driver and use custom setup
> for hmc5843
> and hmc5883.
One driver sounds more sensible in this case.
>
> Is there another way which I overlooked?
>
> Thanks,
>
> marek
>


      reply	other threads:[~2012-04-18  8:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17 20:51 adding hmc5883 driver Marek Belisko
2012-04-18  8:45 ` Jonathan Cameron [this message]

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=4F8E7F3E.5080406@kernel.org \
    --to=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=marek.belisko@open-nandra.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.