Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363459
b: refs/heads/master
c: 9c468aa
h: refs/heads/master
i:
  363457: 81528ed
  363455: 391f644
v: v3
  • Loading branch information
Eduardo Valentin authored and Greg Kroah-Hartman committed Mar 15, 2013
1 parent cebe883 commit 4847571
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d3c291ab802fe8d7c467eddfa1029fa6fc663434
refs/heads/master: 9c468aa2d5a376d4b3a1b5aac867f75c0754abed
23 changes: 22 additions & 1 deletion trunk/drivers/staging/omap-thermal/omap-bandgap.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,38 @@

#include "omap-bandgap.h"

/**
* omap_bandgap_readl() - simple read helper function
* @bg_ptr: pointer to omap_bandgap structure
* @reg: desired register (offset) to be read
*
* Helper function to read bandgap registers. It uses the io remapped area.
* Returns the register value.
*/
static u32 omap_bandgap_readl(struct omap_bandgap *bg_ptr, u32 reg)
{
return readl(bg_ptr->base + reg);
}

/**
* omap_bandgap_writel() - simple write helper function
* @bg_ptr: pointer to omap_bandgap structure
* @val: desired register value to be written
* @reg: desired register (offset) to be written
*
* Helper function to write bandgap registers. It uses the io remapped area.
*/
static void omap_bandgap_writel(struct omap_bandgap *bg_ptr, u32 val, u32 reg)
{
writel(val, bg_ptr->base + reg);
}

/* update bits, value will be shifted */
/**
* DOC: macro to update bits.
*
* RMW_BITS() - used to read, modify and update bandgap bitfields.
* The value passed will be shifted.
*/
#define RMW_BITS(bg_ptr, id, reg, mask, val) \
do { \
struct temp_sensor_registers *t; \
Expand Down

0 comments on commit 4847571

Please sign in to comment.