From: stefano babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] misc:pmic New generic pmic driver
Date: Sun, 02 Oct 2011 18:12:07 +0200 [thread overview]
Message-ID: <4E888D57.4060007@denx.de> (raw)
In-Reply-To: <1317049825-25751-2-git-send-email-l.majewski@samsung.com>
Am 26/09/2011 17:10, schrieb Lukasz Majewski:
> This commit adds new PMIC core driver.
>
> PMIC IC devices connected via I2C or SPI can be used.
> Separate files: pmic_i2c.c and pmic_spi.c are responsible
> for handling transmission specific files for I2C or SPI busses.
>
> pmic_fsl.c and pmic_max8998.c are PMIC specific files. They define
> pmic_init() method for early init.
>
> New flags added:
> CONFIG_PMIC - enable PMIC general device.
> CONFIG_PMIC_I2C/SPI - specify the interface to be used.
> CONFIG_PMIC_MAX8998/FSL - add routines specific for PMIC chip.
>
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Stefano Babic <sbabic@denx.de>
Hi Lukasz,
> +
> + if (!(i % 8))
> + printf("\n0x%02x: ", i);
> +
> + printf("%08x ", val);
> + }
> + puts("\n");
> +}
> +
> +
Drop the second newline-
> +int pmic_init(void)
> +{
> + struct pmic *p = get_pmic();
> + static const char name[] = "FSL_PMIC";
> +
> + puts("Board PMIC init\n");
This contains no info - you can drop or replace puts with debug().
> + p->hw.spi.bitlen = CONFIG_FSL_PMIC_BITLEN;
> + p->hw.spi.flags = SPI_XFER_BEGIN | SPI_XFER_END;
> + p->hw.spi.prepare_tx = pmic_spi_prepare_tx;
> +
> + return 0;
> +}
Ok - I do not know if CONFIG_FSL_PMIC_BITLEN is really needed, but we
can leave it.
> +int pmic_probe(struct pmic *p)
> +{
> + i2c_set_bus_num(p->bus);
> + printf("PMIC:%s probed!\n", p->name);
Probably this comes from your testing - you can drop it or use debug()
> + if (i2c_probe(pmic_i2c_addr)) {
> + puts("Can't find max8998\n");
...and we have not always a max8998 !
> +int pmic_init(void)
> +{
> + struct pmic *p = get_pmic();
> + static const char name[] = "MAX8998_PMIC";
> +
> + puts("Board PMIC init\n");
Replace with debug()
> diff --git a/drivers/misc/pmic_spi.c b/drivers/misc/pmic_spi.c
> diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
> index 7d05dc8..bbc54f0 100644
> --- a/include/configs/mx51evk.h
> +++ b/include/configs/mx51evk.h
You can leave away the MX boards (and we have to change all of them or
none of them - there are also MX3 boards that can use the new code).
> * MMC Configs
> diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
> index 886c8be..aa51114 100644
Put changes to board configuration in a separate patch.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2011-10-02 16:12 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-01 9:13 [U-Boot] [PATCH 0/2] misc:max8998 Support for MAX8998 PMIC driver Lukasz Majewski
2011-09-01 9:13 ` [U-Boot] [PATCH 1/2] " Lukasz Majewski
2011-09-01 9:13 ` [U-Boot] [PATCH 2/2] misc:samsung:s5p Enable MAX8998 support at GONI reference target Lukasz Majewski
2011-09-12 8:14 ` [U-Boot] [PATCH 0/2] misc:max8998 Support for MAX8998 PMIC driver Lukasz Majewski
2011-09-12 10:50 ` Stefano Babic
2011-09-12 11:41 ` Wolfgang Denk
2011-09-12 13:18 ` Lukasz Majewski
2011-09-12 13:50 ` Stefano Babic
2011-09-19 15:06 ` [U-Boot] [RFC 0/2] Generic " Lukasz Majewski
2011-09-19 15:06 ` [U-Boot] [RFC 1/2] misc:pmic New generic pmic driver Lukasz Majewski
2011-09-19 15:06 ` [U-Boot] [RFC 2/2] misc:pmic:max8998: Support for max8998 pmic Lukasz Majewski
2011-09-20 8:23 ` [U-Boot] [RFC 0/2] Generic PMIC driver Stefano Babic
2011-09-20 12:38 ` Lukasz Majewski
2011-09-20 14:08 ` Stefano Babic
2011-09-26 15:10 ` [U-Boot] [PATCH 0/3] misc:pmic: New PMIC generic driver Lukasz Majewski
2011-09-26 15:10 ` [U-Boot] [PATCH 1/3] misc:pmic New generic pmic driver Lukasz Majewski
2011-10-02 16:12 ` stefano babic [this message]
2011-09-26 15:10 ` [U-Boot] [PATCH 2/3] misc:pmic: Enable PMIC handling at u-boot startup code Lukasz Majewski
2011-10-02 16:14 ` stefano babic
2011-09-26 15:10 ` [U-Boot] [PATCH 3/3] misc:pmic:mx: Code modification for mx51evk board Lukasz Majewski
2011-10-02 16:15 ` stefano babic
2011-09-28 11:28 ` [U-Boot] [PATCH 0/3] misc:pmic: New PMIC generic driver Stefano Babic
2011-09-28 11:56 ` Lukasz Majewski
2011-10-02 15:58 ` stefano babic
2011-10-04 5:45 ` [U-Boot] [PATCH v2 " Lukasz Majewski
2011-10-04 5:45 ` [U-Boot] [PATCH v2 1/3] misc:pmic:core New generic PMIC driver Lukasz Majewski
2011-10-05 10:52 ` Stefano Babic
2011-10-06 9:48 ` Stefano Babic
2011-10-06 11:13 ` Lukasz Majewski
2011-10-06 11:19 ` Stefano Babic
2011-10-04 5:45 ` [U-Boot] [PATCH v2 2/3] misc:pmic:max8998 MAX8998 support at a new " Lukasz Majewski
2011-10-05 10:53 ` Stefano Babic
2011-10-12 10:55 ` Stefano Babic
2011-10-04 5:45 ` [U-Boot] [PATCH v2 3/3] misc:pmic:samsung Enable PMIC driver at GONI target Lukasz Majewski
2011-10-05 10:54 ` Stefano Babic
2011-10-12 10:56 ` Stefano Babic
2011-10-05 10:52 ` [U-Boot] [PATCH v2 0/3] misc:pmic: New PMIC generic driver Stefano Babic
2011-10-05 10:56 ` [U-Boot] [PATCH v2 4/4] misc: pmic: Freescale PMIC switches to generic PMIC driver Stefano Babic
2011-10-06 12:37 ` [U-Boot] [PATCH v3 1/3] misc:pmic:core New " Lukasz Majewski
2011-10-12 10:57 ` Stefano Babic
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=4E888D57.4060007@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/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.