Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1592910

Re: [PATCH v4 2/2] mmc: host: s3cmci: allow probing from device tree

From Jaehoon Chung <jh80.chung@samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 2/2] mmc: host: s3cmci: allow probing from device tree
Date 2017-03-06 05:00 +0100
Message-ID <thRYt-20v-15@gated-at.bofh.it> (permalink)
References <tgnJ7-38l-5@gated-at.bofh.it> <tgL8J-2LO-7@gated-at.bofh.it> <tgnJ8-38l-21@gated-at.bofh.it> <tgL8J-2LO-5@gated-at.bofh.it> <tgTIZ-wr-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 03/03/2017 08:38 PM, Sergio Prado wrote:
> On Fri, Mar 03, 2017 at 11:14:29AM +0900, Jaehoon Chung wrote:
>> On 03/02/2017 10:18 AM, Sergio Prado wrote:
>>> Allows configuring Samsung S3C24XX MMC/SD/SDIO controller using a device
>>> tree.
>>>
>>> Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
>>> ---
>>>  drivers/mmc/host/s3cmci.c | 298 ++++++++++++++++++++++++----------------------
>>>  drivers/mmc/host/s3cmci.h |   3 +-
>>>  2 files changed, 158 insertions(+), 143 deletions(-)
>>>
>>> diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
>>> index 7a173f8c455b..d066dbdb957c 100644
>>> --- a/drivers/mmc/host/s3cmci.c
>>> +++ b/drivers/mmc/host/s3cmci.c
>>> @@ -24,6 +24,10 @@
>>>  #include <linux/interrupt.h>
>>>  #include <linux/irq.h>
>>>  #include <linux/io.h>
>>> +#include <linux/of.h>
>>> +#include <linux/of_device.h>
>>> +#include <linux/of_gpio.h>
>>> +#include <linux/mmc/slot-gpio.h>
>>>  
>>>  #include <plat/gpio-cfg.h>
>>>  #include <mach/dma.h>
>>> @@ -128,6 +132,22 @@ enum dbg_channels {
>>>  	dbg_conf  = (1 << 8),
>>>  };
>>>  
>>> +struct s3cmci_variant_data {
>>> +	int s3c2440_compatible;
>>> +};
>>
>> I didn't understand why this structure needs.
>>
>> Before this patch,
>> host->is2440;
>>
>> After this patch,
>> host->variant->s3c2440_compatible;
>>
>> Just add the one pointer for checking s3c2400 compatible..
>> Is it really meaningful?
>> (I didn't read the previous comments fully.)
> 
> Although just a pointer would be enought, having a structure makes it
> more flexible to extend it in the future.

If you will add the other members in this structure, it's ok.
But if it's only for compatible, i don't agree this.

Best Regards,
Jaehoon Chung

> 
> Best regards,
> 
> Sergio Prado
> 
> 
> 

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/2] mmc: host: s3cmci: add device tree support Sergio Prado <sergio.prado@e-labworks.com> - 2017-03-02 02:30 +0100
  [PATCH v4 1/2] dt-bindings: mmc: add DT binding for S3C24XX MMC/SD/SDIO controller Sergio Prado <sergio.prado@e-labworks.com> - 2017-03-02 02:30 +0100
    Re: [PATCH v4 1/2] dt-bindings: mmc: add DT binding for S3C24XX  MMC/SD/SDIO controller Jaehoon Chung <jh80.chung@samsung.com> - 2017-03-03 03:40 +0100
    Re: [PATCH v4 1/2] dt-bindings: mmc: add DT binding for S3C24XX  MMC/SD/SDIO controller Rob Herring <robh@kernel.org> - 2017-03-03 08:50 +0100
  [PATCH v4 2/2] mmc: host: s3cmci: allow probing from device tree Sergio Prado <sergio.prado@e-labworks.com> - 2017-03-02 02:30 +0100
    Re: [PATCH v4 2/2] mmc: host: s3cmci: allow probing from device tree Jaehoon Chung <jh80.chung@samsung.com> - 2017-03-03 03:30 +0100
      Re: [PATCH v4 2/2] mmc: host: s3cmci: allow probing from device tree Sergio Prado <sergio.prado@e-labworks.com> - 2017-03-03 12:40 +0100
        Re: [PATCH v4 2/2] mmc: host: s3cmci: allow probing from device tree Jaehoon Chung <jh80.chung@samsung.com> - 2017-03-06 05:00 +0100

csiph-web