Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344989
b: refs/heads/master
c: 29f5b5a
h: refs/heads/master
i:
  344987: 6221f8d
v: v3
  • Loading branch information
Davide Ciminaghi authored and Samuel Ortiz committed Nov 20, 2012
1 parent a7fe783 commit 4710054
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d94e25535a7979a6c81922496f475a5dd0e006b4
refs/heads/master: 29f5b5a326b44c55e81b15308255ba695fecb323
22 changes: 22 additions & 0 deletions trunk/drivers/mfd/sta2x11-mfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,28 @@ u32 __sta2x11_mfd_mask(struct pci_dev *pdev, u32 reg, u32 mask, u32 val,
}
EXPORT_SYMBOL(__sta2x11_mfd_mask);

int sta2x11_mfd_get_regs_data(struct platform_device *dev,
enum sta2x11_mfd_plat_dev index,
void __iomem **regs,
spinlock_t **lock)
{
struct pci_dev *pdev = *(struct pci_dev **)(dev->dev.platform_data);
struct sta2x11_mfd *mfd;

if (!pdev)
return -ENODEV;
mfd = sta2x11_mfd_find(pdev);
if (!mfd)
return -ENODEV;
if (index >= sta2x11_n_mfd_plat_devs)
return -ENODEV;
*regs = mfd->regs[index];
*lock = &mfd->lock[index];
pr_debug("%s %d *regs = %p\n", __func__, __LINE__, *regs);
return *regs ? 0 : -ENODEV;
}
EXPORT_SYMBOL(sta2x11_mfd_get_regs_data);

/*
* Special sta2x11-mfd regmap lock/unlock functions
*/
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/mfd/sta2x11-mfd.h
Original file line number Diff line number Diff line change
Expand Up @@ -474,4 +474,9 @@ u32 sta2x11_apb_soc_regs_mask(struct pci_dev *pdev, u32 reg, u32 mask, u32 val)
#define COMPENSATION_REG3 0x3cc
#define TEST_CTL_REG 0x3d0

extern int sta2x11_mfd_get_regs_data(struct platform_device *pdev,
enum sta2x11_mfd_plat_dev index,
void __iomem **regs,
spinlock_t **lock);

#endif /* __STA2X11_MFD_H */

0 comments on commit 4710054

Please sign in to comment.