Lines Matching defs:common

91 	struct rcar_thermal_common *common;
100 #define rcar_thermal_for_each_priv(pos, common) \
101 list_for_each_entry(pos, &common->head, list)
104 #define rcar_priv_to_dev(priv) ((priv)->common->dev)
105 #define rcar_has_irq_support(priv) ((priv)->common->base)
142 static u32 _rcar_thermal_common_read(struct rcar_thermal_common *common,
145 return ioread32(common->base + reg);
150 static void _rcar_thermal_common_write(struct rcar_thermal_common *common,
153 iowrite32(data, common->base + reg);
158 static void _rcar_thermal_common_bset(struct rcar_thermal_common *common,
163 val = ioread32(common->base + reg);
166 iowrite32(val, common->base + reg);
295 struct rcar_thermal_common *common = priv->common;
302 spin_lock_irqsave(&common->lock, flags);
304 rcar_thermal_common_bset(common, INTMSK, mask, enable ? 0 : mask);
306 spin_unlock_irqrestore(&common->lock, flags);
343 struct rcar_thermal_common *common = data;
347 spin_lock(&common->lock);
349 mask = rcar_thermal_common_read(common, INTMSK);
350 status = rcar_thermal_common_read(common, STR);
351 rcar_thermal_common_write(common, STR, 0x000F0F0F & mask);
353 spin_unlock(&common->lock);
360 rcar_thermal_for_each_priv(priv, common) {
376 struct rcar_thermal_common *common = platform_get_drvdata(pdev);
380 rcar_thermal_for_each_priv(priv, common) {
397 struct rcar_thermal_common *common;
408 common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL);
409 if (!common)
412 platform_set_drvdata(pdev, common);
414 INIT_LIST_HEAD(&common->head);
415 spin_lock_init(&common->lock);
416 common->dev = dev;
432 if (!common->base) {
435 * Then, driver uses common registers
440 common->base = devm_ioremap_resource(dev, res);
441 if (IS_ERR(common->base)) {
442 ret = PTR_ERR(common->base);
450 IRQF_SHARED, dev_name(dev), common);
478 priv->common = common;
519 list_move_tail(&priv->list, &common->head);
526 if (common->base && enr_bits)
527 rcar_thermal_common_write(common, ENR, enr_bits);
542 struct rcar_thermal_common *common = dev_get_drvdata(dev);
543 struct rcar_thermal_priv *priv = list_first_entry(&common->head,
547 rcar_thermal_common_write(common, ENR, 0);
557 struct rcar_thermal_common *common = dev_get_drvdata(dev);
558 struct rcar_thermal_priv *priv = list_first_entry(&common->head,
567 rcar_thermal_common_write(common, ENR, 0x03);