Skip to content

Commit

Permalink
clk: sunxi-ng: Rename the internal structures
Browse files Browse the repository at this point in the history
Rename the structures meant to be embedded in other structures to make it
consistent with the mux structure name

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
  • Loading branch information
Maxime Ripard committed Oct 20, 2016
1 parent 35b1fc2 commit a501a14
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 32 deletions.
6 changes: 3 additions & 3 deletions drivers/clk/sunxi-ng/ccu_div.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "ccu_mux.h"

/**
* struct _ccu_div - Internal divider description
* struct ccu_div_internal - Internal divider description
* @shift: Bit offset of the divider in its register
* @width: Width of the divider field in its register
* @max: Maximum value allowed for that divider. This is the
Expand All @@ -36,7 +36,7 @@
* It is basically a wrapper around the clk_divider functions
* arguments.
*/
struct _ccu_div {
struct ccu_div_internal {
u8 shift;
u8 width;

Expand Down Expand Up @@ -78,7 +78,7 @@ struct _ccu_div {
struct ccu_div {
u32 enable;

struct _ccu_div div;
struct ccu_div_internal div;
struct ccu_mux_internal mux;
struct ccu_common common;
};
Expand Down
12 changes: 6 additions & 6 deletions drivers/clk/sunxi-ng/ccu_frac.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "ccu_frac.h"

bool ccu_frac_helper_is_enabled(struct ccu_common *common,
struct _ccu_frac *cf)
struct ccu_frac_internal *cf)
{
if (!(common->features & CCU_FEATURE_FRACTIONAL))
return false;
Expand All @@ -23,7 +23,7 @@ bool ccu_frac_helper_is_enabled(struct ccu_common *common,
}

void ccu_frac_helper_enable(struct ccu_common *common,
struct _ccu_frac *cf)
struct ccu_frac_internal *cf)
{
unsigned long flags;
u32 reg;
Expand All @@ -38,7 +38,7 @@ void ccu_frac_helper_enable(struct ccu_common *common,
}

void ccu_frac_helper_disable(struct ccu_common *common,
struct _ccu_frac *cf)
struct ccu_frac_internal *cf)
{
unsigned long flags;
u32 reg;
Expand All @@ -53,7 +53,7 @@ void ccu_frac_helper_disable(struct ccu_common *common,
}

bool ccu_frac_helper_has_rate(struct ccu_common *common,
struct _ccu_frac *cf,
struct ccu_frac_internal *cf,
unsigned long rate)
{
if (!(common->features & CCU_FEATURE_FRACTIONAL))
Expand All @@ -63,7 +63,7 @@ bool ccu_frac_helper_has_rate(struct ccu_common *common,
}

unsigned long ccu_frac_helper_read_rate(struct ccu_common *common,
struct _ccu_frac *cf)
struct ccu_frac_internal *cf)
{
u32 reg;

Expand All @@ -84,7 +84,7 @@ unsigned long ccu_frac_helper_read_rate(struct ccu_common *common,
}

int ccu_frac_helper_set_rate(struct ccu_common *common,
struct _ccu_frac *cf,
struct ccu_frac_internal *cf,
unsigned long rate)
{
unsigned long flags;
Expand Down
14 changes: 7 additions & 7 deletions drivers/clk/sunxi-ng/ccu_frac.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "ccu_common.h"

struct _ccu_frac {
struct ccu_frac_internal {
u32 enable;
u32 select;

Expand All @@ -33,21 +33,21 @@ struct _ccu_frac {
}

bool ccu_frac_helper_is_enabled(struct ccu_common *common,
struct _ccu_frac *cf);
struct ccu_frac_internal *cf);
void ccu_frac_helper_enable(struct ccu_common *common,
struct _ccu_frac *cf);
struct ccu_frac_internal *cf);
void ccu_frac_helper_disable(struct ccu_common *common,
struct _ccu_frac *cf);
struct ccu_frac_internal *cf);

bool ccu_frac_helper_has_rate(struct ccu_common *common,
struct _ccu_frac *cf,
struct ccu_frac_internal *cf,
unsigned long rate);

unsigned long ccu_frac_helper_read_rate(struct ccu_common *common,
struct _ccu_frac *cf);
struct ccu_frac_internal *cf);

int ccu_frac_helper_set_rate(struct ccu_common *common,
struct _ccu_frac *cf,
struct ccu_frac_internal *cf,
unsigned long rate);

#endif /* _CCU_FRAC_H_ */
4 changes: 2 additions & 2 deletions drivers/clk/sunxi-ng/ccu_mp.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
struct ccu_mp {
u32 enable;

struct _ccu_div m;
struct _ccu_div p;
struct ccu_div_internal m;
struct ccu_div_internal p;
struct ccu_mux_internal mux;
struct ccu_common common;
};
Expand Down
4 changes: 2 additions & 2 deletions drivers/clk/sunxi-ng/ccu_mult.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "ccu_common.h"
#include "ccu_mux.h"

struct _ccu_mult {
struct ccu_mult_internal {
u8 shift;
u8 width;
};
Expand All @@ -18,7 +18,7 @@ struct _ccu_mult {
struct ccu_mult {
u32 enable;

struct _ccu_mult mult;
struct ccu_mult_internal mult;
struct ccu_mux_internal mux;
struct ccu_common common;
};
Expand Down
4 changes: 2 additions & 2 deletions drivers/clk/sunxi-ng/ccu_nk.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ struct ccu_nk {
u32 enable;
u32 lock;

struct _ccu_mult n;
struct _ccu_mult k;
struct ccu_mult_internal n;
struct ccu_mult_internal k;

unsigned int fixed_post_div;

Expand Down
6 changes: 3 additions & 3 deletions drivers/clk/sunxi-ng/ccu_nkm.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ struct ccu_nkm {
u32 enable;
u32 lock;

struct _ccu_mult n;
struct _ccu_mult k;
struct _ccu_div m;
struct ccu_mult_internal n;
struct ccu_mult_internal k;
struct ccu_div_internal m;
struct ccu_mux_internal mux;

struct ccu_common common;
Expand Down
8 changes: 4 additions & 4 deletions drivers/clk/sunxi-ng/ccu_nkmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ struct ccu_nkmp {
u32 enable;
u32 lock;

struct _ccu_mult n;
struct _ccu_mult k;
struct _ccu_div m;
struct _ccu_div p;
struct ccu_mult_internal n;
struct ccu_mult_internal k;
struct ccu_div_internal m;
struct ccu_div_internal p;

struct ccu_common common;
};
Expand Down
6 changes: 3 additions & 3 deletions drivers/clk/sunxi-ng/ccu_nm.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ struct ccu_nm {
u32 enable;
u32 lock;

struct _ccu_mult n;
struct _ccu_div m;
struct _ccu_frac frac;
struct ccu_mult_internal n;
struct ccu_div_internal m;
struct ccu_frac_internal frac;

struct ccu_common common;
};
Expand Down

0 comments on commit a501a14

Please sign in to comment.